make sure we have the database created in time at launch

This commit is contained in:
tibbi 2018-03-02 12:10:06 +01:00
parent fd055152df
commit 9cb647ca12
1 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,7 @@ import com.simplemobiletools.contacts.dialogs.ExportContactsDialog
import com.simplemobiletools.contacts.dialogs.FilterContactSourcesDialog import com.simplemobiletools.contacts.dialogs.FilterContactSourcesDialog
import com.simplemobiletools.contacts.dialogs.ImportContactsDialog import com.simplemobiletools.contacts.dialogs.ImportContactsDialog
import com.simplemobiletools.contacts.extensions.config import com.simplemobiletools.contacts.extensions.config
import com.simplemobiletools.contacts.extensions.dbHelper
import com.simplemobiletools.contacts.extensions.getTempFile import com.simplemobiletools.contacts.extensions.getTempFile
import com.simplemobiletools.contacts.helpers.ContactsHelper import com.simplemobiletools.contacts.helpers.ContactsHelper
import com.simplemobiletools.contacts.helpers.VcfExporter import com.simplemobiletools.contacts.helpers.VcfExporter
@ -53,6 +54,9 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
appLaunched() appLaunched()
setupTabColors() setupTabColors()
// just get a reference to the database to make sure it is created properly
dbHelper
handlePermission(PERMISSION_READ_CONTACTS) { handlePermission(PERMISSION_READ_CONTACTS) {
if (it) { if (it) {
handlePermission(PERMISSION_WRITE_CONTACTS) { handlePermission(PERMISSION_WRITE_CONTACTS) {