diff options
author | Allan Wang <me@allanwang.ca> | 2021-01-24 20:02:12 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2021-01-24 20:02:12 -0800 |
commit | 2c85dae785b67241ef72500ac3c43fdff86bbad0 (patch) | |
tree | aed233a587838d42caccdd771a52a1f4471d8092 /app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt | |
parent | 4c2c8a9ce4872e8bbb2a55c8b527e4f7b22ef633 (diff) | |
download | frost-2c85dae785b67241ef72500ac3c43fdff86bbad0.tar.gz frost-2c85dae785b67241ef72500ac3c43fdff86bbad0.tar.bz2 frost-2c85dae785b67241ef72500ac3c43fdff86bbad0.zip |
Revert "Add option to log out for messenger"
This reverts commit 4c2c8a9ce4872e8bbb2a55c8b527e4f7b22ef633.
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt b/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt index a5d4e191..b8d0d86f 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/contracts/FrostContentContract.kt @@ -16,19 +16,11 @@ */ package com.pitchedapps.frost.contracts -import android.content.Context import android.view.View -import ca.allanwang.kau.utils.materialDialog -import com.pitchedapps.frost.R -import com.pitchedapps.frost.db.CookieDao -import com.pitchedapps.frost.db.updateMessengerCookie -import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem -import com.pitchedapps.frost.prefs.Prefs import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.channels.BroadcastChannel -import kotlinx.coroutines.launch /** * Created by Allan Wang on 20/12/17. @@ -180,36 +172,7 @@ interface FrostContentCore : DynamicUiContract { fun onTabClicked() /** - * Triggered when view is within viewpager - * and tab is long clicked - */ - fun onTabLongClicked() - - /** * Signal destruction to release some content manually */ fun destroy() } - -internal fun FrostContentCore.onTabLongClicked( - context: Context, - prefs: Prefs, - fbCookie: FbCookie, - cookieDao: CookieDao -) { - when (parent.baseEnum) { - FbItem.MESSENGER -> { - context.materialDialog { - message(R.string.messenger_logout) - positiveButton(R.string.kau_logout) { - scope.launch { - fbCookie.removeMessengerCookie() - cookieDao.updateMessengerCookie(prefs.userId, null) - reloadBase(true) - } - } - negativeButton(R.string.kau_cancel) - } - } - } -} |