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) {
|
||||
initFragments()
|
||||
}
|
||||
|
||||
contacts_fragment?.initContacts()
|
||||
contacts_fragment?.onActivityResume()
|
||||
favorites_fragment?.initContacts()
|
||||
favorites_fragment?.onActivityResume()
|
||||
}
|
||||
|
||||
if (hasPermission(PERMISSION_WRITE_CONTACTS)) {
|
||||
isFirstResume = false
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
|
|
Loading…
Reference in New Issue