Formatting / Layout Tweaks
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
33bc7b6db8
commit
a4421f831a
|
@ -130,6 +130,7 @@ class ByIndex implements CacheHandler {
|
|||
|
||||
for (; i < messagesWrapper.length; i++) {
|
||||
var messageInfo = MessageWrapperToInfo(profileOnion, conversationIdentifier, messagesWrapper[i]);
|
||||
messageInfo.metadata.lastChecked = DateTime.now();
|
||||
cache.addIndexed(messageInfo, start + i);
|
||||
}
|
||||
} catch (e, stacktrace) {
|
||||
|
|
|
@ -7,6 +7,7 @@ import 'package:cwtch/models/profile.dart';
|
|||
import 'package:cwtch/models/redaction.dart';
|
||||
import 'package:cwtch/themes/opaque.dart';
|
||||
import 'package:cwtch/views/contactsview.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cwtch/widgets/profileimage.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
@ -121,7 +122,9 @@ class _ContactRowState extends State<ContactRow> {
|
|||
padding: EdgeInsets.all(0),
|
||||
height: contact.isInvitation ? Provider.of<Settings>(context).fontScaling * 14.0 + 35.0 : Provider.of<Settings>(context).fontScaling * 14.0 + 5.0,
|
||||
child: contact.isInvitation == true
|
||||
? Wrap(alignment: WrapAlignment.start, direction: Axis.vertical, children: <Widget>[
|
||||
? FittedBox(
|
||||
fit: BoxFit.cover,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[
|
||||
Padding(
|
||||
padding: EdgeInsets.all(2),
|
||||
child: TextButton.icon(
|
||||
|
@ -149,7 +152,7 @@ class _ContactRowState extends State<ContactRow> {
|
|||
icon: Icon(Icons.delete, size: 16, color: Provider.of<Settings>(context).theme.mainTextColor),
|
||||
onPressed: _btnReject,
|
||||
))
|
||||
])
|
||||
]))
|
||||
: (contact.isBlocked
|
||||
? IconButton(
|
||||
padding: EdgeInsets.symmetric(vertical: 2.0, horizontal: 0.0),
|
||||
|
@ -168,6 +171,8 @@ class _ContactRowState extends State<ContactRow> {
|
|||
child: Container(
|
||||
padding: EdgeInsets.all(0),
|
||||
height: Provider.of<Settings>(context).fontScaling * 13.0 + 5.0,
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Text(
|
||||
contact.onion,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
|
@ -176,7 +181,7 @@ class _ContactRowState extends State<ContactRow> {
|
|||
fontFamily: "RobotoMono",
|
||||
color: ((contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor : Provider.of<Settings>(context).theme.mainTextColor) as Color)
|
||||
.withOpacity(0.8))),
|
||||
))),
|
||||
)))),
|
||||
],
|
||||
))),
|
||||
Visibility(
|
||||
|
|
|
@ -9,6 +9,7 @@ import 'package:cwtch/models/profile.dart';
|
|||
import 'package:cwtch/themes/opaque.dart';
|
||||
import 'package:cwtch/third_party/base32/base32.dart';
|
||||
import 'package:cwtch/views/contactsview.dart';
|
||||
import 'package:cwtch/widgets/messageloadingbubble.dart';
|
||||
import 'package:cwtch/widgets/staticmessagebubble.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cwtch/widgets/profileimage.dart';
|
||||
|
@ -57,6 +58,12 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// message cache will return a malformed metadata object
|
||||
// if for whatever reason this message doesn't exist
|
||||
if (Provider.of<MessageMetadata>(context).senderHandle == "") {
|
||||
EnvironmentConfig.debugLog("error, cache returned malformed message. This is likely a programming bug.");
|
||||
return MessageLoadingBubble();
|
||||
}
|
||||
var fromMe = Provider.of<MessageMetadata>(context).senderHandle == Provider.of<ProfileInfoState>(context).onion;
|
||||
var isContact = Provider.of<ProfileInfoState>(context).contactList.findContact(Provider.of<MessageMetadata>(context).senderHandle) != null;
|
||||
var isGroup = Provider.of<ProfileInfoState>(context).contactList.getContact(Provider.of<MessageMetadata>(context, listen: false).conversationIdentifier)!.isGroup;
|
||||
|
|
|
@ -961,7 +961,7 @@ packages:
|
|||
source: hosted
|
||||
version: "6.3.0"
|
||||
yaml:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: yaml
|
||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||
|
|
|
@ -39,7 +39,7 @@ dependencies:
|
|||
crypto: ^3.0.2
|
||||
|
||||
glob: any
|
||||
scrollable_positioned_list: ^0.3.2
|
||||
scrollable_positioned_list: 0.3.8
|
||||
file_picker: 5.2.11
|
||||
url_launcher: ^6.0.18
|
||||
window_manager: ^0.3.2
|
||||
|
|
Loading…
Reference in New Issue