Skip to content

Commit

Permalink
Merge pull request #368 from vbh/theme-change
Browse files Browse the repository at this point in the history
Fix: Theme change
  • Loading branch information
roeiedri committed Apr 6, 2022
2 parents 5c28de0 + ab8387b commit 66c981b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import android.view.View
import android.view.WindowManager
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.app.AppCompatDelegate
import com.chooloo.www.chooloolib.interactor.preferences.PreferencesInteractor
import com.chooloo.www.chooloolib.interactor.string.StringsInteractor
import io.reactivex.disposables.CompositeDisposable
Expand All @@ -27,6 +28,7 @@ abstract class BaseActivity<VM : BaseViewState> : AppCompatActivity(), BaseView<
}
applicationContext.setTheme(preferences.accentTheme.theme)
setTheme(preferences.accentTheme.theme)
AppCompatDelegate.setDefaultNightMode(preferences.themeMode.mode)
contentView?.let { setContentView(it) }
onSetup()
viewState.apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,6 @@ open class SettingsViewState @Inject constructor(

fun onThemeModeResponse(response: ThemeMode) {
preferencesInteractor.themeMode = response
navigationsInteractor.goToLauncherActivity()
}
}

0 comments on commit 66c981b

Please sign in to comment.