| 10 | import kotlin.system.exitProcess |
| 11 | |
| 12 | class SettingsFragment : BaseHierarchyFragment() { |
| 13 | override val hierarchy = HierarchyDescription( |
| 14 | titleKey = "TMoeSettings", |
| 15 | titleResId = R.string.TMoeSettings, |
| 16 | ) { |
| 17 | category("BasicFunction", R.string.BasicFunction) { |
| 18 | functionSwitch( |
| 19 | EnableDebugMode.INSTANCE, "EnableDebugMode", R.string.EnableDebugMode |
| 20 | ) |
| 21 | functionSwitch( |
| 22 | AntiAntiForward, "AntiAntiForward", R.string.AntiAntiForward, |
| 23 | "RestrictContentMitigationDesc", R.string.RestrictContentMitigationDesc |
| 24 | ) |
| 25 | functionSwitch( |
| 26 | HideSponsoredMsg, "HideSponsoredMsg", R.string.HideSponsoredMsg |
| 27 | ) |
| 28 | functionSwitch(FuckTrackingHook, "FuckTrackingHook", R.string.FuckTrackingHook, "FuckTrackingHookDesc", R.string.FuckTrackingHookDesc) |
| 29 | functionSwitch( |
| 30 | HideUserAvatar.INSTANCE, "HideUserAvatar", R.string.HideUserAvatar, |
| 31 | descProvider = { |
| 32 | if (HideUserAvatar.INSTANCE.isEnabledByUser) { |
| 33 | LocaleController.formatString( |
| 34 | "HideUserAvatarEnabledTargetCount", |
| 35 | R.string.HideUserAvatarEnabledTargetCount, |
| 36 | HideUserAvatar.INSTANCE.selectedUserCount, |
| 37 | HideUserAvatar.INSTANCE.selectedChannelCount, |
| 38 | HideUserAvatar.INSTANCE.selectedGroupCount |
| 39 | ) |
| 40 | } else { |
| 41 | LocaleController.getString("NotEnabled", R.string.NotEnabled) |
| 42 | } |
| 43 | }, |
| 44 | onClick = { |
| 45 | Toast.makeText( |
| 46 | context, |
| 47 | LocaleController.getString("NotImplemented", R.string.NotImplemented), |
| 48 | Toast.LENGTH_SHORT |
| 49 | ).show() |
| 50 | } |
| 51 | ) |
| 52 | |
| 53 | functionSwitch( |
| 54 | AntiAntiCopy, "AntiAntiCopy", R.string.AntiAntiCopy, |
| 55 | descProvider = { |
| 56 | LocaleController.getString("AntiAntiCopyD", R.string.AntiAntiCopyD) |
| 57 | } |
| 58 | ) |
| 59 | functionSwitch( |
| 60 | ProhibitSpoilers, "ProhibitSpoilers", R.string.ProhibitSpoilers, |
| 61 | descProvider = { |
| 62 | LocaleController.getString("ProhibitSpoilersD", R.string.ProhibitSpoilersD) |
| 63 | } |
| 64 | ) |
| 65 | functionSwitch( |
| 66 | HistoricalNewsOption, "HistoricalNewsOption", R.string.HistoricalNewsOption, |
| 67 | descProvider = { |
| 68 | LocaleController.getString("HistoricalNewsOptionDesc", R.string.HistoricalNewsOptionDesc) |
| 69 | } |
nothing calls this directly
no test coverage detected