Receive sharing intent
This commit is contained in:
parent
a0828535d5
commit
701c4d2757
11 changed files with 167 additions and 77 deletions
|
|
@ -77,7 +77,16 @@ class ChatListItem extends StatelessWidget {
|
|||
|
||||
if (room.membership == Membership.join) {
|
||||
if (Matrix.of(context).shareContent != null) {
|
||||
unawaited(room.sendEvent(Matrix.of(context).shareContent));
|
||||
if (Matrix.of(context).shareContent["msgtype"] ==
|
||||
"chat.fluffy.shared_file") {
|
||||
await Matrix.of(context).tryRequestWithErrorToast(
|
||||
room.sendFileEvent(
|
||||
Matrix.of(context).shareContent["file"],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
unawaited(room.sendEvent(Matrix.of(context).shareContent));
|
||||
}
|
||||
Matrix.of(context).shareContent = null;
|
||||
}
|
||||
await Navigator.pushAndRemoveUntil(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue