|
|
|
@ -20,7 +20,7 @@ class InactiveTabsAutoCloseDialogController(
|
|
|
|
|
* Dismiss the auto-close dialog.
|
|
|
|
|
*/
|
|
|
|
|
fun close() {
|
|
|
|
|
settings.hasInactiveTabsAutoCloseDialogBeenDismissed = true
|
|
|
|
|
markDialogAsShown()
|
|
|
|
|
refeshInactiveTabsSecion()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -28,7 +28,7 @@ class InactiveTabsAutoCloseDialogController(
|
|
|
|
|
* Enable the auto-close feature with the after a month setting.
|
|
|
|
|
*/
|
|
|
|
|
fun enableAutoClosed() {
|
|
|
|
|
settings.hasInactiveTabsAutoCloseDialogBeenDismissed = true
|
|
|
|
|
markDialogAsShown()
|
|
|
|
|
settings.closeTabsAfterOneMonth = true
|
|
|
|
|
settings.closeTabsAfterOneWeek = false
|
|
|
|
|
settings.closeTabsAfterOneDay = false
|
|
|
|
@ -36,6 +36,13 @@ class InactiveTabsAutoCloseDialogController(
|
|
|
|
|
refeshInactiveTabsSecion()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Marks the dialog as shown and to not be displayed again.
|
|
|
|
|
*/
|
|
|
|
|
private fun markDialogAsShown() {
|
|
|
|
|
settings.hasInactiveTabsAutoCloseDialogBeenDismissed = true
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@VisibleForTesting
|
|
|
|
|
internal fun refeshInactiveTabsSecion() {
|
|
|
|
|
val tabs = browserStore.state.tabs.filter(tabFilter)
|
|
|
|
|