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++) {
|
for (; i < messagesWrapper.length; i++) {
|
||||||
var messageInfo = MessageWrapperToInfo(profileOnion, conversationIdentifier, messagesWrapper[i]);
|
var messageInfo = MessageWrapperToInfo(profileOnion, conversationIdentifier, messagesWrapper[i]);
|
||||||
|
messageInfo.metadata.lastChecked = DateTime.now();
|
||||||
cache.addIndexed(messageInfo, start + i);
|
cache.addIndexed(messageInfo, start + i);
|
||||||
}
|
}
|
||||||
} catch (e, stacktrace) {
|
} catch (e, stacktrace) {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import 'package:cwtch/models/profile.dart';
|
||||||
import 'package:cwtch/models/redaction.dart';
|
import 'package:cwtch/models/redaction.dart';
|
||||||
import 'package:cwtch/themes/opaque.dart';
|
import 'package:cwtch/themes/opaque.dart';
|
||||||
import 'package:cwtch/views/contactsview.dart';
|
import 'package:cwtch/views/contactsview.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cwtch/widgets/profileimage.dart';
|
import 'package:cwtch/widgets/profileimage.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
@ -121,35 +122,37 @@ class _ContactRowState extends State<ContactRow> {
|
||||||
padding: EdgeInsets.all(0),
|
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,
|
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
|
child: contact.isInvitation == true
|
||||||
? Wrap(alignment: WrapAlignment.start, direction: Axis.vertical, children: <Widget>[
|
? FittedBox(
|
||||||
Padding(
|
fit: BoxFit.cover,
|
||||||
padding: EdgeInsets.all(2),
|
child: Row(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[
|
||||||
child: TextButton.icon(
|
Padding(
|
||||||
label: Text(
|
padding: EdgeInsets.all(2),
|
||||||
AppLocalizations.of(context)!.tooltipAcceptContactRequest,
|
child: TextButton.icon(
|
||||||
style: Provider.of<Settings>(context).scaleFonts(defaultTextButtonStyle),
|
label: Text(
|
||||||
),
|
AppLocalizations.of(context)!.tooltipAcceptContactRequest,
|
||||||
icon: Icon(
|
style: Provider.of<Settings>(context).scaleFonts(defaultTextButtonStyle),
|
||||||
Icons.favorite,
|
),
|
||||||
size: 16,
|
icon: Icon(
|
||||||
color: Provider.of<Settings>(context).theme.mainTextColor,
|
Icons.favorite,
|
||||||
),
|
size: 16,
|
||||||
onPressed: _btnApprove,
|
color: Provider.of<Settings>(context).theme.mainTextColor,
|
||||||
)),
|
),
|
||||||
Padding(
|
onPressed: _btnApprove,
|
||||||
padding: EdgeInsets.all(2),
|
)),
|
||||||
child: TextButton.icon(
|
Padding(
|
||||||
label: Text(
|
padding: EdgeInsets.all(2),
|
||||||
AppLocalizations.of(context)!.tooltipRejectContactRequest,
|
child: TextButton.icon(
|
||||||
style: Provider.of<Settings>(context).scaleFonts(defaultTextButtonStyle),
|
label: Text(
|
||||||
),
|
AppLocalizations.of(context)!.tooltipRejectContactRequest,
|
||||||
style: ButtonStyle(
|
style: Provider.of<Settings>(context).scaleFonts(defaultTextButtonStyle),
|
||||||
backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.backgroundPaneColor),
|
),
|
||||||
foregroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.mainTextColor)),
|
style: ButtonStyle(
|
||||||
icon: Icon(Icons.delete, size: 16, color: Provider.of<Settings>(context).theme.mainTextColor),
|
backgroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.backgroundPaneColor),
|
||||||
onPressed: _btnReject,
|
foregroundColor: MaterialStateProperty.all(Provider.of<Settings>(context).theme.mainTextColor)),
|
||||||
))
|
icon: Icon(Icons.delete, size: 16, color: Provider.of<Settings>(context).theme.mainTextColor),
|
||||||
])
|
onPressed: _btnReject,
|
||||||
|
))
|
||||||
|
]))
|
||||||
: (contact.isBlocked
|
: (contact.isBlocked
|
||||||
? IconButton(
|
? IconButton(
|
||||||
padding: EdgeInsets.symmetric(vertical: 2.0, horizontal: 0.0),
|
padding: EdgeInsets.symmetric(vertical: 2.0, horizontal: 0.0),
|
||||||
|
@ -168,15 +171,17 @@ class _ContactRowState extends State<ContactRow> {
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(0),
|
padding: EdgeInsets.all(0),
|
||||||
height: Provider.of<Settings>(context).fontScaling * 13.0 + 5.0,
|
height: Provider.of<Settings>(context).fontScaling * 13.0 + 5.0,
|
||||||
child: Text(
|
child: FittedBox(
|
||||||
contact.onion,
|
fit: BoxFit.scaleDown,
|
||||||
overflow: TextOverflow.ellipsis,
|
child: Text(
|
||||||
style: Provider.of<Settings>(context).scaleFonts(TextStyle(
|
contact.onion,
|
||||||
fontSize: 13.0,
|
overflow: TextOverflow.ellipsis,
|
||||||
fontFamily: "RobotoMono",
|
style: Provider.of<Settings>(context).scaleFonts(TextStyle(
|
||||||
color: ((contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor : Provider.of<Settings>(context).theme.mainTextColor) as Color)
|
fontSize: 13.0,
|
||||||
.withOpacity(0.8))),
|
fontFamily: "RobotoMono",
|
||||||
))),
|
color: ((contact.isBlocked ? Provider.of<Settings>(context).theme.portraitBlockedTextColor : Provider.of<Settings>(context).theme.mainTextColor) as Color)
|
||||||
|
.withOpacity(0.8))),
|
||||||
|
)))),
|
||||||
],
|
],
|
||||||
))),
|
))),
|
||||||
Visibility(
|
Visibility(
|
||||||
|
|
|
@ -9,6 +9,7 @@ import 'package:cwtch/models/profile.dart';
|
||||||
import 'package:cwtch/themes/opaque.dart';
|
import 'package:cwtch/themes/opaque.dart';
|
||||||
import 'package:cwtch/third_party/base32/base32.dart';
|
import 'package:cwtch/third_party/base32/base32.dart';
|
||||||
import 'package:cwtch/views/contactsview.dart';
|
import 'package:cwtch/views/contactsview.dart';
|
||||||
|
import 'package:cwtch/widgets/messageloadingbubble.dart';
|
||||||
import 'package:cwtch/widgets/staticmessagebubble.dart';
|
import 'package:cwtch/widgets/staticmessagebubble.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:cwtch/widgets/profileimage.dart';
|
import 'package:cwtch/widgets/profileimage.dart';
|
||||||
|
@ -57,6 +58,12 @@ class MessageRowState extends State<MessageRow> with SingleTickerProviderStateMi
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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 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 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;
|
var isGroup = Provider.of<ProfileInfoState>(context).contactList.getContact(Provider.of<MessageMetadata>(context, listen: false).conversationIdentifier)!.isGroup;
|
||||||
|
|
|
@ -961,7 +961,7 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "6.3.0"
|
version: "6.3.0"
|
||||||
yaml:
|
yaml:
|
||||||
dependency: transitive
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
name: yaml
|
name: yaml
|
||||||
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
|
||||||
|
|
|
@ -39,7 +39,7 @@ dependencies:
|
||||||
crypto: ^3.0.2
|
crypto: ^3.0.2
|
||||||
|
|
||||||
glob: any
|
glob: any
|
||||||
scrollable_positioned_list: ^0.3.2
|
scrollable_positioned_list: 0.3.8
|
||||||
file_picker: 5.2.11
|
file_picker: 5.2.11
|
||||||
url_launcher: ^6.0.18
|
url_launcher: ^6.0.18
|
||||||
window_manager: ^0.3.2
|
window_manager: ^0.3.2
|
||||||
|
|
Loading…
Reference in New Issue