Remove K9Drawer.updateFooterItems()

Once created the footer doesn't change anymore.
This commit is contained in:
cketti 2021-02-26 02:12:52 +01:00
parent e5b473b4fb
commit 45f07607b8

View file

@ -48,7 +48,6 @@ import com.mikepenz.materialdrawer.util.addItems
import com.mikepenz.materialdrawer.util.addStickyFooterItem import com.mikepenz.materialdrawer.util.addStickyFooterItem
import com.mikepenz.materialdrawer.util.getDrawerItem import com.mikepenz.materialdrawer.util.getDrawerItem
import com.mikepenz.materialdrawer.util.removeAllItems import com.mikepenz.materialdrawer.util.removeAllItems
import com.mikepenz.materialdrawer.util.removeAllStickyFooterItems
import com.mikepenz.materialdrawer.widget.AccountHeaderView import com.mikepenz.materialdrawer.widget.AccountHeaderView
import com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView import com.mikepenz.materialdrawer.widget.MaterialDrawerSliderView
import java.util.ArrayList import java.util.ArrayList
@ -218,8 +217,6 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
headerView.setActiveProfile((account.accountNumber + 1 shl DRAWER_ACCOUNT_SHIFT).toLong()) headerView.setActiveProfile((account.accountNumber + 1 shl DRAWER_ACCOUNT_SHIFT).toLong())
headerView.accountHeaderBackground.setColorFilter(account.chipColor, PorterDuff.Mode.MULTIPLY) headerView.accountHeaderBackground.setColorFilter(account.chipColor, PorterDuff.Mode.MULTIPLY)
viewModel.loadFolders(account) viewModel.loadFolders(account)
updateFooterItems()
} }
// Account can be null to refresh all (unified inbox or account list). // Account can be null to refresh all (unified inbox or account list).
@ -236,11 +233,6 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
} }
} }
private fun updateFooterItems() {
sliderView.removeAllStickyFooterItems()
addFooterItems()
}
private fun handleItemClickListener(drawerItem: IDrawerItem<*>) { private fun handleItemClickListener(drawerItem: IDrawerItem<*>) {
when (drawerItem.identifier) { when (drawerItem.identifier) {
DRAWER_ID_PREFERENCES -> SettingsActivity.launch(parent) DRAWER_ID_PREFERENCES -> SettingsActivity.launch(parent)
@ -326,7 +318,6 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
return return
} }
} }
updateFooterItems()
} }
fun deselect() { fun deselect() {
@ -339,7 +330,6 @@ class K9Drawer(private val parent: MessageList, savedInstanceState: Bundle?) : K
deselect() deselect()
unifiedInboxSelected = true unifiedInboxSelected = true
sliderView.setSelection(DRAWER_ID_UNIFIED_INBOX, false) sliderView.setSelection(DRAWER_ID_UNIFIED_INBOX, false)
updateFooterItems()
} }
private data class DrawerColors( private data class DrawerColors(