mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
Added possibility to hide call history
This commit is contained in:
@ -265,7 +265,7 @@ class MainActivity : SimpleActivity() {
|
||||
var wantedTab = getDefaultTab()
|
||||
|
||||
// open the Recents tab if we got here by clicking a missed call notification
|
||||
if (intent.action == Intent.ACTION_VIEW) {
|
||||
if (intent.action == Intent.ACTION_VIEW && config.showTabs and TAB_CALL_HISTORY > 0) {
|
||||
wantedTab = main_tabs_holder.tabCount - 1
|
||||
}
|
||||
|
||||
@ -375,9 +375,11 @@ class MainActivity : SimpleActivity() {
|
||||
TAB_FAVORITES -> if (showTabsMask and TAB_CONTACTS > 0) 1 else 0
|
||||
else -> {
|
||||
if (showTabsMask and TAB_CONTACTS > 0) {
|
||||
if (showTabsMask and TAB_FAVORITES > 0) 2 else 1
|
||||
if (showTabsMask and TAB_FAVORITES > 0 && showTabsMask and TAB_CALL_HISTORY > 0) 2
|
||||
else if (showTabsMask and TAB_CALL_HISTORY > 0) 1
|
||||
else 0
|
||||
} else {
|
||||
if (showTabsMask and TAB_FAVORITES > 0) 1 else 0
|
||||
if (showTabsMask and TAB_FAVORITES > 0 && showTabsMask and TAB_CALL_HISTORY > 0) 1 else 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ import com.simplemobiletools.commons.helpers.TAB_CALL_HISTORY
|
||||
import com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
import com.simplemobiletools.dialer.R
|
||||
import com.simplemobiletools.dialer.extensions.config
|
||||
import com.simplemobiletools.dialer.helpers.ALL_TABS_MASK
|
||||
|
||||
class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) {
|
||||
private var view = activity.layoutInflater.inflate(R.layout.dialog_manage_visible_tabs, null)
|
||||
@ -42,6 +43,10 @@ class ManageVisibleTabsDialog(val activity: BaseSimpleActivity) {
|
||||
}
|
||||
}
|
||||
|
||||
if (result == 0) {
|
||||
result = ALL_TABS_MASK
|
||||
}
|
||||
|
||||
activity.config.showTabs = result
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user