Compare commits
2 Commits
70e2ca3d3e
...
f44861fead
Author | SHA1 | Date | |
---|---|---|---|
f44861fead | |||
1c4a30ebb4 |
@ -59,7 +59,8 @@
|
||||
"file": "File",
|
||||
"sticker": "Sticker",
|
||||
"retracted": "The message has been retracted",
|
||||
"retractedFallback": "A previous message has been retracted but your client does not support it"
|
||||
"retractedFallback": "A previous message has been retracted but your client does not support it",
|
||||
"you": "You"
|
||||
},
|
||||
"errors": {
|
||||
"omemo": {
|
||||
|
@ -59,7 +59,8 @@
|
||||
"file": "Datei",
|
||||
"sticker": "Sticker",
|
||||
"retracted": "Die Nachricht wurde zurückgezogen",
|
||||
"retractedFallback": "Eine vorherige Nachricht wurde zurückgezogen. Dein Client unterstüzt dies jedoch nicht"
|
||||
"retractedFallback": "Eine vorherige Nachricht wurde zurückgezogen. Dein Client unterstüzt dies jedoch nicht",
|
||||
"you": "Du"
|
||||
},
|
||||
"errors": {
|
||||
"omemo": {
|
||||
|
@ -49,6 +49,10 @@ const Color bubbleTextColor = Color(0xffffffff);
|
||||
/// The color of text within a quote widget
|
||||
const Color bubbleTextQuoteColor = Color(0xffdadada);
|
||||
|
||||
/// The color of the sender name in a quote
|
||||
const Color bubbleTextQuoteSenderColor = Color(0xffff90ff);
|
||||
|
||||
/// The color of the input text field of the conversation page
|
||||
const Color conversationTextFieldColorLight = Color(0xffe6e6e6);
|
||||
const Color conversationTextFieldColorDark = Color(0xff414141);
|
||||
|
||||
|
@ -91,6 +91,11 @@ class StickersSettingsPage extends StatelessWidget {
|
||||
),
|
||||
|
||||
SectionTitle(t.pages.settings.stickers.stickerPacksSection),
|
||||
|
||||
if (stickers.stickerPacks.isEmpty)
|
||||
SettingsRow(
|
||||
title: t.pages.conversation.stickerPickerNoStickersLine1,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
@ -1,7 +1,47 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get_it/get_it.dart';
|
||||
import 'package:moxxyv2/i18n/strings.g.dart';
|
||||
import 'package:moxxyv2/ui/bloc/conversation_bloc.dart';
|
||||
import 'package:moxxyv2/ui/constants.dart';
|
||||
import 'package:moxxyv2/ui/service/data.dart';
|
||||
import 'package:moxxyv2/ui/theme.dart';
|
||||
|
||||
class QuoteSenderText extends StatelessWidget {
|
||||
const QuoteSenderText({
|
||||
required this.sender,
|
||||
required this.resetQuoteNotNull,
|
||||
required this.sent,
|
||||
super.key,
|
||||
});
|
||||
|
||||
/// The sender JID of the quoted message.
|
||||
final String sender;
|
||||
|
||||
/// True if resetQuote is not null.
|
||||
final bool resetQuoteNotNull;
|
||||
|
||||
/// The sent attribute passed to the quote widget.
|
||||
final bool sent;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final sentBySelf = resetQuoteNotNull ?
|
||||
sent :
|
||||
sender == GetIt.I.get<UIDataService>().ownJid;
|
||||
|
||||
return Text(
|
||||
sentBySelf ?
|
||||
t.messages.you :
|
||||
GetIt.I.get<ConversationBloc>().state.conversation!.titleWithOptionalContact,
|
||||
style: const TextStyle(
|
||||
color: bubbleTextQuoteSenderColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// Figures out the best text color for quotes. [context] is the surrounding
|
||||
/// BuildContext. [insideTextField] is true if the quote is used as a widget inside
|
||||
/// the TextField.
|
||||
|
@ -29,11 +29,23 @@ class QuotedMediaBaseWidget extends StatelessWidget {
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 8),
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: getQuoteTextColor(context, resetQuote != null),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
QuoteSenderText(
|
||||
sender: message.sender,
|
||||
resetQuoteNotNull: resetQuote != null,
|
||||
sent: sent,
|
||||
),
|
||||
|
||||
Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: getQuoteTextColor(context, resetQuote != null),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
|
@ -14,16 +14,28 @@ class QuotedTextWidget extends StatelessWidget {
|
||||
final Message message;
|
||||
final bool sent;
|
||||
final void Function()? resetQuote;
|
||||
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return QuoteBaseWidget(
|
||||
message,
|
||||
Text(
|
||||
message.body,
|
||||
style: TextStyle(
|
||||
color: getQuoteTextColor(context, resetQuote != null),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
QuoteSenderText(
|
||||
sender: message.sender,
|
||||
resetQuoteNotNull: resetQuote != null,
|
||||
sent: sent,
|
||||
),
|
||||
|
||||
Text(
|
||||
message.body,
|
||||
style: TextStyle(
|
||||
color: getQuoteTextColor(context, resetQuote != null),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
sent,
|
||||
resetQuotedMessage: resetQuote,
|
||||
|
Loading…
Reference in New Issue
Block a user