diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-17 12:38:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 12:38:42 -0700 |
commit | e4679b1663fa78a99c6c8225e454595c6c6f4e38 (patch) | |
tree | a777ee782207c89d6e9243399471b9ad936736d0 /app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt | |
parent | 7bf93ea74b00ab7e8ceedac2aac6ad08fdf099ab (diff) | |
download | frost-e4679b1663fa78a99c6c8225e454595c6c6f4e38.tar.gz frost-e4679b1663fa78a99c6c8225e454595c6c6f4e38.tar.bz2 frost-e4679b1663fa78a99c6c8225e454595c6c6f4e38.zip |
Fix notifications and long press for albums (#69)v1.3.2
* Allow for album images to be viewed
* Update listing info
* Web refractoring
* Test message notifications
* Fix notifications and context press
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt index 875f1c49..3b0125be 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/facebook/FbCookie.kt @@ -94,12 +94,14 @@ object FbCookie { * When coming back to the main app, switch back to our original account before continuing */ fun switchBackUser(callback: () -> Unit) { - if (Prefs.prevId != -1L && Prefs.prevId != Prefs.userId) { - switchUser(Prefs.prevId) { - L.d("Switch back user", "${Prefs.userId} to ${Prefs.prevId}") + if (Prefs.prevId == -1L) return callback() + val prevId = Prefs.prevId + Prefs.prevId = -1L + if (prevId != Prefs.userId) { + switchUser(prevId) { + L.d("Switch back user", "${Prefs.userId} to ${prevId}") callback() } } else callback() - if (Prefs.prevId != -1L) Prefs.prevId = -1L } }
\ No newline at end of file |