Update sdk
This commit is contained in:
parent
15540a9a19
commit
2ffbd751e1
13 changed files with 43 additions and 34 deletions
|
|
@ -77,12 +77,13 @@ class MatrixState extends State<Matrix> {
|
|||
await storage.deleteItem(widget.clientName);
|
||||
}
|
||||
|
||||
Future<String> downloadAndSaveContent(MxContent content,
|
||||
Future<String> downloadAndSaveContent(Uri content,
|
||||
{int width, int height, ThumbnailMethod method}) async {
|
||||
final bool thumbnail = width == null && height == null ? false : true;
|
||||
final String tempDirectory = (await getTemporaryDirectory()).path;
|
||||
final String prefix = thumbnail ? "thumbnail" : "";
|
||||
File file = File('$tempDirectory/${prefix}_${content.mxc.split("/").last}');
|
||||
File file =
|
||||
File('$tempDirectory/${prefix}_${content.toString().split("/").last}');
|
||||
|
||||
if (!file.existsSync()) {
|
||||
final url = thumbnail
|
||||
|
|
@ -214,7 +215,7 @@ class MatrixState extends State<Matrix> {
|
|||
// The person object for the android message style notification
|
||||
final person = Person(
|
||||
name: room.getLocalizedDisplayname(context),
|
||||
icon: room.avatar.mxc.isEmpty
|
||||
icon: room.avatar == null
|
||||
? null
|
||||
: await downloadAndSaveContent(
|
||||
room.avatar,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue