change isFirstResume only if we have the required permissions

This commit is contained in:
tibbi 2018-02-21 16:36:00 +01:00
parent 42eb8e4609
commit 08726093ec
1 changed files with 5 additions and 1 deletions

View File

@ -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()