Feature collection #19

Open
mwarning wants to merge 37 commits from mwarning/luna-tracker:bottle_time into master
Showing only changes of commit 18578581b5 - Show all commits
@@ -86,8 +86,6 @@ class MainActivity : AppCompatActivity() {
recyclerView = findViewById(R.id.list_events) recyclerView = findViewById(R.id.list_events)
recyclerView.setLayoutManager(LinearLayoutManager(applicationContext)) recyclerView.setLayoutManager(LinearLayoutManager(applicationContext))
populateHeaderMenu()
// Set listeners // Set listeners
findViewById<View>(R.id.logbooks_add_button).setOnClickListener { findViewById<View>(R.id.logbooks_add_button).setOnClickListener {
showAddLogbookDialog(true) showAddLogbookDialog(true)
@@ -138,8 +136,6 @@ class MainActivity : AppCompatActivity() {
allEvents = logbook?.logs ?: arrayListOf() allEvents = logbook?.logs ?: arrayListOf()
setListAdapter(allEvents) setListAdapter(allEvents)
populateHeaderMenu()
} }
private fun populateHeaderMenu() { private fun populateHeaderMenu() {
@@ -1127,6 +1123,8 @@ class MainActivity : AppCompatActivity() {
logbook = lb logbook = lb
showLogbook() showLogbook()
populateHeaderMenu()
if (DEBUG_CHECK_LOGBOOK_CONSISTENCY) { if (DEBUG_CHECK_LOGBOOK_CONSISTENCY) {
for (e in logbook?.logs ?: listOf()) { for (e in logbook?.logs ?: listOf()) {
val em = e.getHeaderEmoji(this@MainActivity) val em = e.getHeaderEmoji(this@MainActivity)
@@ -1245,6 +1243,8 @@ class MainActivity : AppCompatActivity() {
Toast.LENGTH_SHORT Toast.LENGTH_SHORT
).show() ).show()
savingEvent(false) savingEvent(false)
populateHeaderMenu()
}) })
} }