forked from cwtch.im/cwtch-ui
Merge pull request 'clean up compose bar' (#152) from erinn45 into trunk
Reviewed-on: cwtch.im/cwtch-ui#152 Reviewed-by: Sarah Jamie Lewis <sarah@openprivacy.ca>
This commit is contained in:
commit
67ed282394
|
@ -105,6 +105,10 @@ class _MessageViewState extends State<MessageView> {
|
||||||
//IconButton(icon: Icon(Icons.chat), onPressed: _pushContactSettings),
|
//IconButton(icon: Icon(Icons.chat), onPressed: _pushContactSettings),
|
||||||
//IconButton(icon: Icon(Icons.list), onPressed: _pushContactSettings),
|
//IconButton(icon: Icon(Icons.list), onPressed: _pushContactSettings),
|
||||||
//IconButton(icon: Icon(Icons.push_pin), onPressed: _pushContactSettings),
|
//IconButton(icon: Icon(Icons.push_pin), onPressed: _pushContactSettings),
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(CwtchIcons.send_invite, size: 24),
|
||||||
|
tooltip: AppLocalizations.of(context)!.sendInvite,
|
||||||
|
onPressed: (){_modalSendInvitation(context);}),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Provider.of<ContactInfoState>(context, listen: false).isGroup == true ? Icon(CwtchIcons.group_settings_24px) : Icon(CwtchIcons.peer_settings_24px),
|
icon: Provider.of<ContactInfoState>(context, listen: false).isGroup == true ? Icon(CwtchIcons.group_settings_24px) : Icon(CwtchIcons.peer_settings_24px),
|
||||||
tooltip: AppLocalizations.of(context)!.conversationSettings,
|
tooltip: AppLocalizations.of(context)!.conversationSettings,
|
||||||
|
@ -205,38 +209,31 @@ class _MessageViewState extends State<MessageView> {
|
||||||
child: RawKeyboardListener(
|
child: RawKeyboardListener(
|
||||||
focusNode: FocusNode(),
|
focusNode: FocusNode(),
|
||||||
onKey: handleKeyPress,
|
onKey: handleKeyPress,
|
||||||
child: TextFormField(
|
child: Padding(
|
||||||
key: Key('txtCompose'),
|
padding: EdgeInsets.all(8), child:TextFormField(
|
||||||
controller: ctrlrCompose,
|
key: Key('txtCompose'),
|
||||||
focusNode: focusNode,
|
controller: ctrlrCompose,
|
||||||
autofocus: !Platform.isAndroid,
|
focusNode: focusNode,
|
||||||
textInputAction: TextInputAction.newline,
|
autofocus: !Platform.isAndroid,
|
||||||
keyboardType: TextInputType.multiline,
|
textInputAction: TextInputAction.newline,
|
||||||
enableIMEPersonalizedLearning: false,
|
keyboardType: TextInputType.multiline,
|
||||||
minLines: 1,
|
enableIMEPersonalizedLearning: false,
|
||||||
maxLines: null,
|
minLines: 1,
|
||||||
onFieldSubmitted: _sendMessage,
|
maxLines: null,
|
||||||
enabled: !isOffline,
|
onFieldSubmitted: _sendMessage,
|
||||||
decoration: InputDecoration(
|
enabled: !isOffline,
|
||||||
hintText: isOffline ? "" : AppLocalizations.of(context)!.placeholderEnterMessage,
|
decoration: InputDecoration(
|
||||||
hintStyle: TextStyle(color: Provider.of<Settings>(context).theme.altTextColor()),
|
hintText: isOffline ? "" : AppLocalizations.of(context)!.placeholderEnterMessage,
|
||||||
enabledBorder: InputBorder.none,
|
hintStyle: TextStyle(color: Provider.of<Settings>(context).theme.altTextColor()),
|
||||||
focusedBorder: InputBorder.none,
|
enabledBorder: InputBorder.none,
|
||||||
enabled: true,
|
focusedBorder: InputBorder.none,
|
||||||
prefixIcon: IconButton(
|
enabled: true,
|
||||||
icon: Icon(CwtchIcons.send_invite, size: 24, color: Provider.of<Settings>(context).theme.mainTextColor()),
|
suffixIcon: ElevatedButton(
|
||||||
tooltip: AppLocalizations.of(context)!.sendInvite,
|
style: ElevatedButton.styleFrom(primary: Provider.of<Settings>(context).theme.defaultButtonColor()),
|
||||||
enableFeedback: true,
|
child: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.mainTextColor()),
|
||||||
splashColor: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
onPressed: isOffline ? null : _sendMessage,
|
||||||
hoverColor: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
))),
|
||||||
onPressed: () => _modalSendInvitation(context)),
|
)))),
|
||||||
suffixIcon: IconButton(
|
|
||||||
icon: Icon(CwtchIcons.send_24px, size: 24, color: Provider.of<Settings>(context).theme.mainTextColor()),
|
|
||||||
tooltip: AppLocalizations.of(context)!.sendMessage,
|
|
||||||
onPressed: isOffline ? null : _sendMessage,
|
|
||||||
),
|
|
||||||
)))),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue