implemented native share intent support for android and ios with chat and folder pickers
This commit is contained in:
@@ -25,11 +25,17 @@ class ChatTile extends StatefulWidget {
|
||||
final bool disableContextActions;
|
||||
final bool hasDraft;
|
||||
|
||||
/// When set, replaces the default tap-into-chat behaviour. Used by the
|
||||
/// share-intent picker to surface the room selection without opening the
|
||||
/// chat view itself.
|
||||
final void Function(GetRoomResponseObject room)? onTapOverride;
|
||||
|
||||
const ChatTile({
|
||||
super.key,
|
||||
required this.data,
|
||||
this.disableContextActions = false,
|
||||
this.hasDraft = false,
|
||||
this.onTapOverride,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -143,6 +149,10 @@ class _ChatTileState extends State<ChatTile> {
|
||||
),
|
||||
),
|
||||
onTap: () {
|
||||
if (widget.onTapOverride != null) {
|
||||
widget.onTapOverride!(widget.data);
|
||||
return;
|
||||
}
|
||||
if (selfUsername == null) return;
|
||||
unawaited(_setCurrentAsRead());
|
||||
final view = ChatView(
|
||||
|
||||
Reference in New Issue
Block a user