Formatting
continuous-integration/drone/pr Build is running
Details
continuous-integration/drone/pr Build is running
Details
This commit is contained in:
parent
a0a00b1ade
commit
60b2b34abc
|
@ -924,9 +924,6 @@ class CwtchFfi implements Cwtch {
|
||||||
malloc.free(u1);
|
malloc.free(u1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool IsServersCompiled() {
|
bool IsServersCompiled() {
|
||||||
return library.providesSymbol("c_LoadServers");
|
return library.providesSymbol("c_LoadServers");
|
||||||
|
|
|
@ -365,7 +365,6 @@ class CwtchGomobile implements Cwtch {
|
||||||
cwtchPlatform.invokeMethod("DeleteServerInfo", {"ProfileOnion": profile, "handle": handle});
|
cwtchPlatform.invokeMethod("DeleteServerInfo", {"ProfileOnion": profile, "handle": handle});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void UpdateSettings(String json) {
|
void UpdateSettings(String json) {
|
||||||
cwtchPlatform.invokeMethod("UpdateSettings", {"json": json});
|
cwtchPlatform.invokeMethod("UpdateSettings", {"json": json});
|
||||||
|
|
|
@ -68,7 +68,6 @@ class ProfileInfoState extends ChangeNotifier {
|
||||||
this._contacts.addAll(contacts.map((contact) {
|
this._contacts.addAll(contacts.map((contact) {
|
||||||
this._unreadMessages += contact["numUnread"] as int;
|
this._unreadMessages += contact["numUnread"] as int;
|
||||||
|
|
||||||
|
|
||||||
return ContactInfoState(this.onion, contact["identifier"], contact["onion"],
|
return ContactInfoState(this.onion, contact["identifier"], contact["onion"],
|
||||||
nickname: contact["name"],
|
nickname: contact["name"],
|
||||||
localNickname: contact["attributes"]?["local.profile.name"] ?? "", // contact may not have a local name
|
localNickname: contact["attributes"]?["local.profile.name"] ?? "", // contact may not have a local name
|
||||||
|
|
|
@ -217,8 +217,8 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
|
||||||
subtitle: Text(AppLocalizations.of(context)!.savePeerHistoryDescription),
|
subtitle: Text(AppLocalizations.of(context)!.savePeerHistoryDescription),
|
||||||
leading: Icon(CwtchIcons.peer_history, color: settings.current().mainTextColor),
|
leading: Icon(CwtchIcons.peer_history, color: settings.current().mainTextColor),
|
||||||
trailing: DropdownButton(
|
trailing: DropdownButton(
|
||||||
value: (Provider.of<ContactInfoState>(context).savePeerHistory == "DefaultDeleteHistory" ||
|
value:
|
||||||
Provider.of<ContactInfoState>(context).savePeerHistory == "HistoryDefault")
|
(Provider.of<ContactInfoState>(context).savePeerHistory == "DefaultDeleteHistory" || Provider.of<ContactInfoState>(context).savePeerHistory == "HistoryDefault")
|
||||||
? AppLocalizations.of(context)!.conversationNotificationPolicyDefault
|
? AppLocalizations.of(context)!.conversationNotificationPolicyDefault
|
||||||
: (Provider.of<ContactInfoState>(context).savePeerHistory == "SaveHistory"
|
: (Provider.of<ContactInfoState>(context).savePeerHistory == "SaveHistory"
|
||||||
? AppLocalizations.of(context)!.savePeerHistory
|
? AppLocalizations.of(context)!.savePeerHistory
|
||||||
|
@ -246,7 +246,11 @@ class _PeerSettingsViewState extends State<PeerSettingsView> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
items: [AppLocalizations.of(context)!.conversationNotificationPolicyDefault, AppLocalizations.of(context)!.savePeerHistory, AppLocalizations.of(context)!.dontSavePeerHistory].map<DropdownMenuItem<String>>((String value) {
|
items: [
|
||||||
|
AppLocalizations.of(context)!.conversationNotificationPolicyDefault,
|
||||||
|
AppLocalizations.of(context)!.savePeerHistory,
|
||||||
|
AppLocalizations.of(context)!.dontSavePeerHistory
|
||||||
|
].map<DropdownMenuItem<String>>((String value) {
|
||||||
return DropdownMenuItem<String>(
|
return DropdownMenuItem<String>(
|
||||||
value: value,
|
value: value,
|
||||||
child: Text(value, style: settings.scaleFonts(defaultDropDownMenuItemTextStyle)),
|
child: Text(value, style: settings.scaleFonts(defaultDropDownMenuItemTextStyle)),
|
||||||
|
|
|
@ -97,7 +97,9 @@ class _RemoteServerViewState extends State<RemoteServerView> {
|
||||||
Tooltip(
|
Tooltip(
|
||||||
message: serverInfoState.groups.isNotEmpty ? AppLocalizations.of(context)!.cannotDeleteServerIfActiveGroups : AppLocalizations.of(context)!.leaveConversation,
|
message: serverInfoState.groups.isNotEmpty ? AppLocalizations.of(context)!.cannotDeleteServerIfActiveGroups : AppLocalizations.of(context)!.leaveConversation,
|
||||||
child: ElevatedButton.icon(
|
child: ElevatedButton.icon(
|
||||||
onPressed: serverInfoState.groups.isNotEmpty ? null : () {
|
onPressed: serverInfoState.groups.isNotEmpty
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
showAlertDialog(context);
|
showAlertDialog(context);
|
||||||
},
|
},
|
||||||
icon: Icon(CwtchIcons.leave_group),
|
icon: Icon(CwtchIcons.leave_group),
|
||||||
|
@ -112,7 +114,6 @@ class _RemoteServerViewState extends State<RemoteServerView> {
|
||||||
child: Text(AppLocalizations.of(context)!.groupsOnThisServerLabel),
|
child: Text(AppLocalizations.of(context)!.groupsOnThisServerLabel),
|
||||||
),
|
),
|
||||||
Expanded(child: _buildGroupsList(serverInfoState)),
|
Expanded(child: _buildGroupsList(serverInfoState)),
|
||||||
|
|
||||||
])));
|
])));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue