history browser x-axis fix
This commit is contained in:
parent
8b45464f30
commit
8d2139fb59
1 changed files with 8 additions and 4 deletions
|
@ -113,9 +113,13 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
||||||
val dateSetListener = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
val dateSetListener = DatePickerDialog.OnDateSetListener { _, year, monthOfYear, dayOfMonth ->
|
||||||
val cal = Calendar.getInstance()
|
val cal = Calendar.getInstance()
|
||||||
cal.timeInMillis = start
|
cal.timeInMillis = start
|
||||||
cal.set(Calendar.YEAR, year)
|
cal[Calendar.YEAR] = year
|
||||||
cal.set(Calendar.MONTH, monthOfYear)
|
cal[Calendar.MONTH] = monthOfYear
|
||||||
cal.set(Calendar.DAY_OF_MONTH, dayOfMonth)
|
cal[Calendar.DAY_OF_MONTH] = dayOfMonth
|
||||||
|
cal[Calendar.MILLISECOND] = 0
|
||||||
|
cal[Calendar.SECOND] = 0
|
||||||
|
cal[Calendar.MINUTE] = 0
|
||||||
|
cal[Calendar.HOUR_OF_DAY] = 0
|
||||||
start = cal.timeInMillis
|
start = cal.timeInMillis
|
||||||
historybrowse_date?.text = dateUtil.dateAndTimeString(start)
|
historybrowse_date?.text = dateUtil.dateAndTimeString(start)
|
||||||
runCalculation("onClickDate")
|
runCalculation("onClickDate")
|
||||||
|
@ -282,7 +286,7 @@ class HistoryBrowseActivity : NoSplashAppCompatActivity() {
|
||||||
// do preparation in different thread
|
// do preparation in different thread
|
||||||
withContext(Dispatchers.Default) {
|
withContext(Dispatchers.Default) {
|
||||||
val fromTime: Long = start + T.secs(100).msecs()
|
val fromTime: Long = start + T.secs(100).msecs()
|
||||||
val toTime: Long = start + T.hours(rangeToDisplay.toLong()).msecs()
|
val toTime: Long = start + T.hours(rangeToDisplay.toLong()).msecs() + T.secs(100).msecs()
|
||||||
aapsLogger.debug(LTag.UI, "Period: " + dateUtil.dateAndTimeString(fromTime) + " - " + dateUtil.dateAndTimeString(toTime))
|
aapsLogger.debug(LTag.UI, "Period: " + dateUtil.dateAndTimeString(fromTime) + " - " + dateUtil.dateAndTimeString(toTime))
|
||||||
val pointer = System.currentTimeMillis()
|
val pointer = System.currentTimeMillis()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue