Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun createDatabaseForNewUser(userId: String): Boolean {
- try {
- FlowManager.destroy()
- }
- catch (e: Exception) {
- Timber.e("Exception thrown attempting to destroy dbflow database")
- }
- val succesInitNewDb = openDbWithPreLoginUserId("pwcwelcome123", MyMobility.myMobility)
- val successUpdateKey = try {
- updateDbKeyAfterSignIn(userId)
- true
- }catch (e: Exception) { false}
- return succesInitNewDb && successUpdateKey
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement