fix: Last bits for the release

This commit is contained in:
Christian Pauly 2020-09-21 19:21:24 +02:00
parent 165c64ce36
commit 1db9bdd975
6 changed files with 44 additions and 25 deletions

View file

@ -235,7 +235,9 @@ class ChatListItem extends StatelessWidget {
: Text( : Text(
room.lastEvent?.getLocalizedBody( room.lastEvent?.getLocalizedBody(
L10n.of(context), L10n.of(context),
withSenderNamePrefix: !room.isDirectChat, withSenderNamePrefix: !room.isDirectChat ||
room.lastEvent.senderId ==
room.client.userID,
hideReply: true, hideReply: true,
) ?? ) ??
'', '',

View file

@ -13,20 +13,22 @@ class StateMessage extends StatelessWidget {
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 8.0, left: 8.0,
right: 8.0, right: 8.0,
bottom: 16.0, bottom: 8.0,
), ),
child: Container( child: Center(
alignment: Alignment.center, child: Container(
decoration: BoxDecoration( padding: const EdgeInsets.all(4),
color: Theme.of(context).backgroundColor.withOpacity(0.66), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7), color: Theme.of(context).backgroundColor.withOpacity(0.8),
), borderRadius: BorderRadius.circular(7),
child: Text( ),
event.getLocalizedBody(L10n.of(context)), child: Text(
textAlign: TextAlign.center, event.getLocalizedBody(L10n.of(context)),
style: TextStyle( textAlign: TextAlign.center,
color: Theme.of(context).textTheme.bodyText2.color, style: TextStyle(
decoration: event.redacted ? TextDecoration.lineThrough : null, color: Theme.of(context).textTheme.bodyText2.color,
decoration: event.redacted ? TextDecoration.lineThrough : null,
),
), ),
), ),
), ),

View file

@ -24,8 +24,11 @@ extension MatrixFileExtension on MatrixFile {
element.click(); element.click();
element.remove(); element.remove();
} else { } else {
var tempDir = await getTemporaryDirectory(); final downloadsDir = Platform.isAndroid
final file = File(tempDir.path + '/' + name.split('/').last); ? (await getExternalStorageDirectory())
: (await getApplicationDocumentsDirectory());
final file = File(downloadsDir.path + '/' + name.split('/').last);
file.writeAsBytesSync(bytes); file.writeAsBytesSync(bytes);
await OpenFile.open(file.path); await OpenFile.open(file.path);
} }

View file

@ -629,12 +629,24 @@ class _ChatState extends State<_Chat> {
client.userID client.userID
? Alignment.topRight ? Alignment.topRight
: Alignment.topLeft, : Alignment.topLeft,
child: Text( child: Container(
seenByText, padding:
maxLines: 1, EdgeInsets.symmetric(horizontal: 4),
overflow: TextOverflow.ellipsis, decoration: BoxDecoration(
style: TextStyle( color: Theme.of(context)
color: Theme.of(context).primaryColor, .scaffoldBackgroundColor
.withOpacity(0.8),
borderRadius:
BorderRadius.circular(4),
),
child: Text(
seenByText,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color:
Theme.of(context).primaryColor,
),
), ),
), ),
padding: EdgeInsets.only( padding: EdgeInsets.only(

View file

@ -180,8 +180,8 @@ packages:
dependency: "direct main" dependency: "direct main"
description: description:
path: "." path: "."
ref: "0ff971faa99ca946acf116a51fc31ef7fe87a745" ref: "5019ebfeb56f0789ab4cc8d27ccda663156b5d68"
resolved-ref: "0ff971faa99ca946acf116a51fc31ef7fe87a745" resolved-ref: "5019ebfeb56f0789ab4cc8d27ccda663156b5d68"
url: "https://gitlab.com/famedly/famedlysdk.git" url: "https://gitlab.com/famedly/famedlysdk.git"
source: git source: git
version: "0.0.1" version: "0.0.1"

View file

@ -27,7 +27,7 @@ dependencies:
famedlysdk: famedlysdk:
git: git:
url: https://gitlab.com/famedly/famedlysdk.git url: https://gitlab.com/famedly/famedlysdk.git
ref: 0ff971faa99ca946acf116a51fc31ef7fe87a745 ref: 5019ebfeb56f0789ab4cc8d27ccda663156b5d68
localstorage: ^3.0.1+4 localstorage: ^3.0.1+4
memoryfilepicker: ^0.1.3 memoryfilepicker: ^0.1.3