forked from cwtch.im/cwtch-ui
move formatting out of experiments in settings
This commit is contained in:
parent
1483ddcc94
commit
0aa0d286ef
|
@ -52,7 +52,8 @@ class RemoteServerInfoState extends ChangeNotifier {
|
|||
void updateSyncProgressFor(DateTime point) {
|
||||
var range = lastPreSyncMessagTime.toUtc().difference(DateTime.now().toUtc());
|
||||
var pointFromStart = lastPreSyncMessagTime.toUtc().difference(point.toUtc());
|
||||
if (!pointFromStart.isNegative) { // ! is Negative cus all the duration's we're calculating incidently are negative
|
||||
if (!pointFromStart.isNegative) {
|
||||
// ! is Negative cus all the duration's we're calculating incidently are negative
|
||||
// this message is from before we think we should be syncing with the server
|
||||
// Can be because of a new server or a full resync, either way, use this (oldest message) as our lastPreSyncMessageTime
|
||||
this.lastPreSyncMessagTime = point;
|
||||
|
|
|
@ -222,6 +222,22 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(CwtchIcons.streamer_bunnymask, color: settings.current().mainTextColor),
|
||||
),
|
||||
SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.formattingExperiment, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
subtitle: Text(AppLocalizations.of(context)!.messageFormattingDescription),
|
||||
value: settings.isExperimentEnabled(FormattingExperiment),
|
||||
onChanged: (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(FormattingExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(FormattingExperiment);
|
||||
}
|
||||
saveSettings(context);
|
||||
},
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.text_fields, color: settings.current().mainTextColor),
|
||||
),
|
||||
SizedBox(
|
||||
height: 40,
|
||||
),
|
||||
|
@ -444,24 +460,6 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
|||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.link, color: settings.current().mainTextColor),
|
||||
)),
|
||||
Visibility(
|
||||
visible: settings.experimentsEnabled,
|
||||
child: SwitchListTile(
|
||||
title: Text(AppLocalizations.of(context)!.formattingExperiment, style: TextStyle(color: settings.current().mainTextColor)),
|
||||
subtitle: Text(AppLocalizations.of(context)!.messageFormattingDescription),
|
||||
value: settings.isExperimentEnabled(FormattingExperiment),
|
||||
onChanged: (bool value) {
|
||||
if (value) {
|
||||
settings.enableExperiment(FormattingExperiment);
|
||||
} else {
|
||||
settings.disableExperiment(FormattingExperiment);
|
||||
}
|
||||
saveSettings(context);
|
||||
},
|
||||
activeTrackColor: settings.theme.defaultButtonActiveColor,
|
||||
inactiveTrackColor: settings.theme.defaultButtonDisabledColor,
|
||||
secondary: Icon(Icons.text_fields, color: settings.current().mainTextColor),
|
||||
)),
|
||||
AboutListTile(
|
||||
icon: appIcon,
|
||||
applicationIcon: Padding(padding: EdgeInsets.all(5), child: Icon(CwtchIcons.cwtch_knott)),
|
||||
|
|
Loading…
Reference in New Issue