Skip to content

Commit

Permalink
upcoming records
Browse files Browse the repository at this point in the history
  • Loading branch information
Husseinfo committed Aug 24, 2024
1 parent 49ffb2d commit 1f7fa68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId "io.github.husseinfo.countin"
minSdk 26
targetSdk 34
versionCode 16
versionName "1.0.6"
versionCode 17
versionName "1.0.7"
}

signingConfigs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ class CountsListAdapter : RecyclerView.Adapter<CountsListAdapter.ViewHolder>() {
}
}

if (difference.isNegative) {
h.itemView.setBackgroundColor(android.graphics.Color.argb(25, 255, 0, 0))
}

if (c.withTime) {
h.hours.text = (c.milliDiff() / 1000 / 3600 % 24).toString()
h.minutes.text = (c.milliDiff() / 1000 / 60 % 60).toString()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ class AddItemActivity : AppCompatActivity() {
tvDate.text = calendar.format()
swTime.isChecked = false
}
it.datePicker.maxDate = Calendar.getInstance().time.time
it.show()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,9 @@ class MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {
}

fun openSettings(view: View) = startActivity(Intent(baseContext, SettingsActivity::class.java))

override fun onDestroy() {
super.onDestroy()
AppDatabase.getDb(applicationContext)?.close()
}
}

0 comments on commit 1f7fa68

Please sign in to comment.