Skip to content

Commit

Permalink
Merge branch 'release/1.2.1' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
mouredev committed Sep 7, 2021
2 parents 3e95e7b + 8cd6f1a commit ec8fd42
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ android {
applicationId "com.mouredev.twitimer"
minSdkVersion 23
targetSdkVersion 30
versionCode 12
versionName "1.2"
versionCode 13
versionName "1.2.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class AccountFragment : Fragment(), InfoFragmentListener, WebViewFragmentListene
setup()
data()
viewModel.load()

}

override fun onResume() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class AccountViewModel : ViewModel() {

val authorizeURL = TwitchService.authorizeURL

private var session: String? = null

// Publisehd

val authenticated: MutableLiveData<Boolean> = MutableLiveData()
Expand All @@ -24,9 +26,10 @@ class AccountViewModel : ViewModel() {

fun load() {
loading.postValue(false)
if (Session.instance.user?.login != null) {
Session.instance.user?.login?.let { login ->
session = login
authenticated.postValue(true)
} else {
} ?: run {
info.postValue(true)
}
}
Expand All @@ -47,7 +50,9 @@ class AccountViewModel : ViewModel() {
}

fun checkSession() {
if (Session.instance.user?.login == null) {
val login = Session.instance.user?.login
if (login == null && session != login) {
session = login
load()
}
}
Expand Down

0 comments on commit ec8fd42

Please sign in to comment.