forked from cwtch.im/cwtch-ui
add quality.sh and run
This commit is contained in:
parent
cddf204695
commit
03fd76c598
|
@ -6,7 +6,6 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../../model.dart';
|
import '../../model.dart';
|
||||||
import '../../settings.dart';
|
|
||||||
|
|
||||||
class TextMessage extends Message {
|
class TextMessage extends Message {
|
||||||
final MessageMetadata metadata;
|
final MessageMetadata metadata;
|
||||||
|
|
|
@ -39,22 +39,22 @@ class _MessageListState extends State<MessageList> {
|
||||||
Visibility(
|
Visibility(
|
||||||
visible: showMessageWarning,
|
visible: showMessageWarning,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(5.0),
|
padding: EdgeInsets.all(5.0),
|
||||||
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
color: Provider.of<Settings>(context).theme.defaultButtonActiveColor(),
|
||||||
child: DefaultTextStyle(
|
child: DefaultTextStyle(
|
||||||
style: TextStyle(color: Provider.of<Settings>(context).theme.defaultButtonTextColor()),
|
style: TextStyle(color: Provider.of<Settings>(context).theme.defaultButtonTextColor()),
|
||||||
child: showSyncing
|
child: showSyncing
|
||||||
? Text(AppLocalizations.of(context)!.serverNotSynced, textAlign: TextAlign.center)
|
? Text(AppLocalizations.of(context)!.serverNotSynced, textAlign: TextAlign.center)
|
||||||
: showOfflineWarning
|
: showOfflineWarning
|
||||||
? Text(Provider.of<ContactInfoState>(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage,
|
? Text(Provider.of<ContactInfoState>(context).isGroup ? AppLocalizations.of(context)!.serverConnectivityDisconnected : AppLocalizations.of(context)!.peerOfflineMessage,
|
||||||
textAlign: TextAlign.center)
|
textAlign: TextAlign.center)
|
||||||
// Only show the ephemeral status for peer conversations, not for groups...
|
// Only show the ephemeral status for peer conversations, not for groups...
|
||||||
: (showEphemeralWarning
|
: (showEphemeralWarning
|
||||||
? Text(AppLocalizations.of(context)!.chatHistoryDefault, textAlign: TextAlign.center)
|
? Text(AppLocalizations.of(context)!.chatHistoryDefault, textAlign: TextAlign.center)
|
||||||
:
|
:
|
||||||
// We are not allowed to put null here, so put an empty text widge
|
// We are not allowed to put null here, so put an empty text widge
|
||||||
Text("")),
|
Text("")),
|
||||||
))),
|
))),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Scrollbar(
|
child: Scrollbar(
|
||||||
controller: ctrlr1,
|
controller: ctrlr1,
|
||||||
|
|
|
@ -146,9 +146,11 @@ class MessageRowState extends State<MessageRow> {
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
|
|
||||||
// Swipe to quote on Android
|
// Swipe to quote on Android
|
||||||
onHorizontalDragEnd: Platform.isAndroid ? (details) {
|
onHorizontalDragEnd: Platform.isAndroid
|
||||||
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageIndex;
|
? (details) {
|
||||||
} : null,
|
Provider.of<AppState>(context, listen: false).selectedIndex = Provider.of<MessageMetadata>(context, listen: false).messageIndex;
|
||||||
|
}
|
||||||
|
: null,
|
||||||
child: Padding(padding: EdgeInsets.all(2), child: Row(mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start, children: widgetRow))));
|
child: Padding(padding: EdgeInsets.all(2), child: Row(mainAxisAlignment: fromMe ? MainAxisAlignment.end : MainAxisAlignment.start, children: widgetRow))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
|
||||||
textWidthBasis: TextWidthBasis.longestLine,
|
textWidthBasis: TextWidthBasis.longestLine,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
var wdgQuote = FutureBuilder(
|
var wdgQuote = FutureBuilder(
|
||||||
future: widget.quotedMessage,
|
future: widget.quotedMessage,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
@ -69,7 +68,7 @@ class QuotedMessageBubbleState extends State<QuotedMessageBubble> {
|
||||||
color: fromMe ? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor() : Provider.of<Settings>(context).theme.messageFromMeBackgroundColor(),
|
color: fromMe ? Provider.of<Settings>(context).theme.messageFromOtherBackgroundColor() : Provider.of<Settings>(context).theme.messageFromMeBackgroundColor(),
|
||||||
child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [
|
child: Wrap(runAlignment: WrapAlignment.spaceEvenly, alignment: WrapAlignment.spaceEvenly, runSpacing: 1.0, crossAxisAlignment: WrapCrossAlignment.center, children: [
|
||||||
Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(Icons.reply, size: 32, color: qTextColor))),
|
Center(widthFactor: 1, child: Padding(padding: EdgeInsets.all(10.0), child: Icon(Icons.reply, size: 32, color: qTextColor))),
|
||||||
Center(widthFactor: 1.0, child: DefaultTextStyle( child: qMessage.getPreviewWidget(context), style: TextStyle( color: qTextColor)))
|
Center(widthFactor: 1.0, child: DefaultTextStyle(child: qMessage.getPreviewWidget(context), style: TextStyle(color: qTextColor)))
|
||||||
]));
|
]));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print(e);
|
print(e);
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
flutter format -l 200 lib
|
Loading…
Reference in New Issue