diff options
author | Allan Wang <me@allanwang.ca> | 2021-01-24 22:04:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 22:04:37 -0800 |
commit | 94aa2dd8125f474570f366408645e5a81236c573 (patch) | |
tree | 2952e3ca17872ef10545081a100f16b720f0072a /app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt | |
parent | 68db99597b68c87f1e0eb2d1feb6b6c63bbff1e9 (diff) | |
parent | 35adc9529f1466e3ae45ee1934536f696bc24547 (diff) | |
download | frost-94aa2dd8125f474570f366408645e5a81236c573.tar.gz frost-94aa2dd8125f474570f366408645e5a81236c573.tar.bz2 frost-94aa2dd8125f474570f366408645e5a81236c573.zip |
Merge pull request #1742 from AllanWang/messenger
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt index 0232694e..c07884bc 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/fragments/FragmentBase.kt @@ -34,6 +34,7 @@ import com.pitchedapps.frost.contracts.MainFabContract import com.pitchedapps.frost.enums.FeedSort import com.pitchedapps.frost.facebook.FbCookie import com.pitchedapps.frost.facebook.FbItem +import com.pitchedapps.frost.injectors.ThemeProvider import com.pitchedapps.frost.prefs.Prefs import com.pitchedapps.frost.utils.ARG_URL import com.pitchedapps.frost.utils.L @@ -49,6 +50,7 @@ import kotlinx.coroutines.channels.ReceiveChannel import kotlinx.coroutines.isActive import kotlinx.coroutines.launch import org.koin.android.ext.android.inject +import org.koin.core.component.inject /** * Created by Allan Wang on 2017-11-07. @@ -84,6 +86,7 @@ abstract class BaseFragment : Fragment(), CoroutineScope, FragmentContract, protected val fbCookie: FbCookie by inject() protected val prefs: Prefs by inject() + protected val themeProvider: ThemeProvider by inject() open lateinit var job: Job override val coroutineContext: CoroutineContext get() = ContextHelper.dispatcher + job @@ -201,10 +204,10 @@ abstract class BaseFragment : Fragment(), CoroutineScope, FragmentContract, protected fun FloatingActionButton.update(iicon: IIcon, click: () -> Unit) { if (isShown) { fadeScaleTransition { - setIcon(iicon, prefs.iconColor) + setIcon(iicon, themeProvider.iconColor) } } else { - setIcon(iicon, prefs.iconColor) + setIcon(iicon, themeProvider.iconColor) show() } setOnClickListener { click() } |