make the fragments nullable in main activity
This commit is contained in:
parent
1dd37336f7
commit
e2d555e300
1 changed files with 8 additions and 8 deletions
|
|
@ -91,15 +91,15 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||||
|
|
||||||
val configShowContactThumbnails = config.showContactThumbnails
|
val configShowContactThumbnails = config.showContactThumbnails
|
||||||
if (storedShowContactThumbnails != configShowContactThumbnails) {
|
if (storedShowContactThumbnails != configShowContactThumbnails) {
|
||||||
contacts_fragment.showContactThumbnailsChanged(configShowContactThumbnails)
|
contacts_fragment?.showContactThumbnailsChanged(configShowContactThumbnails)
|
||||||
favorites_fragment.showContactThumbnailsChanged(configShowContactThumbnails)
|
favorites_fragment?.showContactThumbnailsChanged(configShowContactThumbnails)
|
||||||
}
|
}
|
||||||
|
|
||||||
val configTextColor = config.textColor
|
val configTextColor = config.textColor
|
||||||
if (storedTextColor != configTextColor) {
|
if (storedTextColor != configTextColor) {
|
||||||
main_tabs_holder.getTabAt(getOtherViewPagerItem(viewpager.currentItem))?.icon?.applyColorFilter(configTextColor)
|
main_tabs_holder.getTabAt(getOtherViewPagerItem(viewpager.currentItem))?.icon?.applyColorFilter(configTextColor)
|
||||||
contacts_fragment.textColorChanged(configTextColor)
|
contacts_fragment?.textColorChanged(configTextColor)
|
||||||
favorites_fragment.textColorChanged(configTextColor)
|
favorites_fragment?.textColorChanged(configTextColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
val configBackgroundColor = config.backgroundColor
|
val configBackgroundColor = config.backgroundColor
|
||||||
|
|
@ -111,14 +111,14 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||||
if (storedPrimaryColor != configPrimaryColor) {
|
if (storedPrimaryColor != configPrimaryColor) {
|
||||||
main_tabs_holder.setSelectedTabIndicatorColor(getAdjustedPrimaryColor())
|
main_tabs_holder.setSelectedTabIndicatorColor(getAdjustedPrimaryColor())
|
||||||
main_tabs_holder.getTabAt(viewpager.currentItem)?.icon?.applyColorFilter(getAdjustedPrimaryColor())
|
main_tabs_holder.getTabAt(viewpager.currentItem)?.icon?.applyColorFilter(getAdjustedPrimaryColor())
|
||||||
contacts_fragment.primaryColorChanged()
|
contacts_fragment?.primaryColorChanged()
|
||||||
favorites_fragment.primaryColorChanged()
|
favorites_fragment?.primaryColorChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
val configStartNameWithSurname = config.startNameWithSurname
|
val configStartNameWithSurname = config.startNameWithSurname
|
||||||
if (storedStartNameWithSurname != configStartNameWithSurname) {
|
if (storedStartNameWithSurname != configStartNameWithSurname) {
|
||||||
contacts_fragment.startNameWithSurnameChanged(configStartNameWithSurname)
|
contacts_fragment?.startNameWithSurnameChanged(configStartNameWithSurname)
|
||||||
favorites_fragment.startNameWithSurnameChanged(configStartNameWithSurname)
|
favorites_fragment?.startNameWithSurnameChanged(configStartNameWithSurname)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isFirstResume) {
|
if (!isFirstResume) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue