parent
635e383f65
commit
02407c5abe
|
@ -196,7 +196,7 @@ class CwtchGomobile implements Cwtch {
|
||||||
@override
|
@override
|
||||||
// ignore: non_constant_identifier_names
|
// ignore: non_constant_identifier_names
|
||||||
void DeleteContact(String profileOnion, int conversation) {
|
void DeleteContact(String profileOnion, int conversation) {
|
||||||
cwtchPlatform.invokeMethod("DeleteContact", {"ProfileOnion": profileOnion, "conversation": conversation});
|
cwtchPlatform.invokeMethod("DeleteConversation", {"ProfileOnion": profileOnion, "conversation": conversation});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
@ -137,7 +137,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
style: TextStyle(color: settings.current().mainTextColor),
|
style: TextStyle(color: settings.current().mainTextColor),
|
||||||
),
|
),
|
||||||
leading: Icon(Icons.table_chart, color: settings.current().mainTextColor),
|
leading: Icon(Icons.table_chart, color: settings.current().mainTextColor),
|
||||||
trailing: DropdownButton(
|
trailing: Container(
|
||||||
|
width: MediaQuery.of(context).size.width / 4,
|
||||||
|
child: DropdownButton(
|
||||||
value: settings.uiColumnModeLandscape.toString(),
|
value: settings.uiColumnModeLandscape.toString(),
|
||||||
onChanged: (String? newValue) {
|
onChanged: (String? newValue) {
|
||||||
settings.uiColumnModeLandscape = Settings.uiColumnModeFromString(newValue!);
|
settings.uiColumnModeLandscape = Settings.uiColumnModeFromString(newValue!);
|
||||||
|
@ -151,7 +153,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}).toList())),
|
}).toList()))),
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
title: Text(AppLocalizations.of(context)!.streamerModeLabel, style: TextStyle(color: settings.current().mainTextColor)),
|
title: Text(AppLocalizations.of(context)!.streamerModeLabel, style: TextStyle(color: settings.current().mainTextColor)),
|
||||||
subtitle: Text(AppLocalizations.of(context)!.descriptionStreamerMode),
|
subtitle: Text(AppLocalizations.of(context)!.descriptionStreamerMode),
|
||||||
|
@ -192,7 +194,9 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(AppLocalizations.of(context)!.notificationContentSettingLabel),
|
title: Text(AppLocalizations.of(context)!.notificationContentSettingLabel),
|
||||||
subtitle: Text(AppLocalizations.of(context)!.notificationContentSettingDescription),
|
subtitle: Text(AppLocalizations.of(context)!.notificationContentSettingDescription),
|
||||||
trailing: DropdownButton(
|
trailing: Container(
|
||||||
|
width: MediaQuery.of(context).size.width / 4,
|
||||||
|
child:DropdownButton(
|
||||||
value: settings.notificationContent,
|
value: settings.notificationContent,
|
||||||
onChanged: (NotificationContent? newValue) {
|
onChanged: (NotificationContent? newValue) {
|
||||||
settings.notificationContent = newValue!;
|
settings.notificationContent = newValue!;
|
||||||
|
@ -206,7 +210,7 @@ class _GlobalSettingsViewState extends State<GlobalSettingsView> {
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}).toList()),
|
}).toList())),
|
||||||
leading: Icon(CwtchIcons.chat_bubble_empty_24px, color: settings.current().mainTextColor),
|
leading: Icon(CwtchIcons.chat_bubble_empty_24px, color: settings.current().mainTextColor),
|
||||||
),
|
),
|
||||||
SwitchListTile(
|
SwitchListTile(
|
||||||
|
|
|
@ -197,6 +197,11 @@ class _MessageViewState extends State<MessageView> {
|
||||||
static const GroupMessageLengthMax = 1600;
|
static const GroupMessageLengthMax = 1600;
|
||||||
|
|
||||||
void _sendMessage([String? ignoredParam]) {
|
void _sendMessage([String? ignoredParam]) {
|
||||||
|
|
||||||
|
// Trim message
|
||||||
|
final messageWithoutNewLine = ctrlrCompose.value.text.trimRight();
|
||||||
|
ctrlrCompose.value = TextEditingValue(text: messageWithoutNewLine);
|
||||||
|
|
||||||
var isGroup = Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(Provider.of<AppState>(context, listen: false).selectedConversation!)!.isGroup;
|
var isGroup = Provider.of<ProfileInfoState>(context, listen: false).contactList.getContact(Provider.of<AppState>(context, listen: false).selectedConversation!)!.isGroup;
|
||||||
|
|
||||||
// peers and groups currently have different length constraints (servers can store less)...
|
// peers and groups currently have different length constraints (servers can store less)...
|
||||||
|
@ -375,8 +380,6 @@ class _MessageViewState extends State<MessageView> {
|
||||||
void handleKeyPress(event) {
|
void handleKeyPress(event) {
|
||||||
var data = event.data as RawKeyEventData;
|
var data = event.data as RawKeyEventData;
|
||||||
if (data.logicalKey == LogicalKeyboardKey.enter && !event.isShiftPressed) {
|
if (data.logicalKey == LogicalKeyboardKey.enter && !event.isShiftPressed) {
|
||||||
final messageWithoutNewLine = ctrlrCompose.value.text.trimRight();
|
|
||||||
ctrlrCompose.value = TextEditingValue(text: messageWithoutNewLine);
|
|
||||||
_sendMessage();
|
_sendMessage();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue