Skip to content
This repository was archived by the owner on Nov 19, 2022. It is now read-only.

Commit 34604d2

Browse files
committed
Hopefully fixed one crash for beta
1 parent 93d1afe commit 34604d2

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/munchmates/android/Activities/BaseMMActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@ package com.munchmates.android.Activities
33
import android.content.Intent
44
import android.support.v7.app.AppCompatActivity
55
import com.munchmates.android.App
6+
import com.munchmates.android.Prefs
67

78
abstract class BaseMMActivity: AppCompatActivity() {
89

910
override fun onResume() {
11+
if(Prefs.instance != null) {
12+
Prefs.setInstance(this)
13+
}
1014
if(App.plans.isEmpty()) {
1115
val intent = Intent(this, MMActivity::class.java)
1216
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_NEW_TASK)

app/src/main/java/com/munchmates/android/Activities/LoginActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ class LoginActivity : AppCompatActivity(), View.OnClickListener {
2929
login_button_forgot.setOnClickListener(this)
3030
title = "MunchMates Login"
3131

32+
if(Prefs.instance != null) {
33+
Prefs.setInstance(this)
34+
}
35+
3236
val email = Prefs.instance.getStr(Prefs.EMAIL_PREF)
3337
val password = Prefs.instance.getStr(Prefs.PASSWORD_PREF)
3438
if(email != "" && password != "") {

0 commit comments

Comments
 (0)