Compare commits

...

3 Commits

6 changed files with 22 additions and 10 deletions

View File

@ -418,6 +418,7 @@ class DatabaseService {
Object? originId = notSpecified,
Object? sid = notSpecified,
bool? isRetracted,
Object? thumbnailData = notSpecified,
}) async {
final md = (await _db.query(
'Messages',
@ -490,6 +491,9 @@ class DatabaseService {
if (isRetracted != null) {
m['isRetracted'] = boolToInt(isRetracted);
}
if (thumbnailData != notSpecified) {
m['thumbnailData'] = thumbnailData as String?;
}
await _db.update(
'Messages',

View File

@ -617,6 +617,7 @@ Future<void> performMessageRetraction(RetractMessageComment command, { dynamic e
mediaHeight: null,
mediaSize: null,
isRetracted: true,
thumbnailData: null,
);
sendEvent(MessageUpdatedEvent(message: retractedMessage));

View File

@ -142,6 +142,7 @@ class MessageService {
bool? isDownloading,
Object? originId = notSpecified,
Object? sid = notSpecified,
Object? thumbnailData = notSpecified,
bool? isRetracted,
}) async {
final newMessage = await GetIt.I.get<DatabaseService>().updateMessage(
@ -168,6 +169,7 @@ class MessageService {
sid: sid,
isRetracted: isRetracted,
isMedia: isMedia,
thumbnailData: thumbnailData,
);
if (_messageCache.containsKey(newMessage.conversationJid)) {

View File

@ -785,6 +785,7 @@ class XmppService {
mediaHeight: null,
mediaSize: null,
isRetracted: true,
thumbnailData: null,
);
sendEvent(MessageUpdatedEvent(message: retractedMessage));

View File

@ -26,16 +26,19 @@ class SelfProfileHeader extends StatelessWidget {
await showDialog<dynamic>(
context: context,
builder: (BuildContext context) => Center(
child: SizedBox(
width: 220,
height: 220,
child: QrImage(
data: 'xmpp:$jid',
size: 220,
backgroundColor: Colors.white,
embeddedImage: const AssetImage('assets/images/logo.png'),
embeddedImageStyle: QrEmbeddedImageStyle(
size: const Size(50, 50),
child: ClipRRect(
borderRadius: BorderRadius.all(radiusLarge),
child: SizedBox(
width: 220,
height: 220,
child: QrImage(
data: 'xmpp:$jid',
size: 220,
backgroundColor: Colors.white,
embeddedImage: const AssetImage('assets/images/logo.png'),
embeddedImageStyle: QrEmbeddedImageStyle(
size: const Size(50, 50),
),
),
),
),

View File

@ -266,6 +266,7 @@ class ChatBubbleState extends State<ChatBubble>
right: widget.sentBySelf ? 8 : null,
left: widget.sentBySelf ? null : 8,
child: Material(
borderRadius: _getBorderRadius(),
child: Container(
constraints: BoxConstraints(
maxWidth: widget.maxWidth,