change isFirstResume only if we have the required permissions
This commit is contained in:
parent
42eb8e4609
commit
08726093ec
|
@ -122,13 +122,17 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
|
||||||
if (viewpager.adapter == null) {
|
if (viewpager.adapter == null) {
|
||||||
initFragments()
|
initFragments()
|
||||||
}
|
}
|
||||||
|
|
||||||
contacts_fragment?.initContacts()
|
contacts_fragment?.initContacts()
|
||||||
contacts_fragment?.onActivityResume()
|
contacts_fragment?.onActivityResume()
|
||||||
favorites_fragment?.initContacts()
|
favorites_fragment?.initContacts()
|
||||||
favorites_fragment?.onActivityResume()
|
favorites_fragment?.onActivityResume()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasPermission(PERMISSION_WRITE_CONTACTS)) {
|
||||||
isFirstResume = false
|
isFirstResume = false
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
super.onPause()
|
super.onPause()
|
||||||
|
|
Loading…
Reference in New Issue