add ability to copy room/space link
This commit is contained in:
parent
2c23951ea8
commit
ee648ab105
2 changed files with 18 additions and 8 deletions
|
|
@ -100,7 +100,10 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend.
|
||||||
- [ ] Threads
|
- [ ] Threads
|
||||||
- [x] Profile popouts
|
- [x] Profile popouts
|
||||||
- [ ] Working actions
|
- [ ] Working actions
|
||||||
- [ ] Copy link to [room, space, message]
|
- [ ] Copy link to:
|
||||||
|
- [x] Room
|
||||||
|
- [x] Space
|
||||||
|
- [ ] Message
|
||||||
- [ ] Reporting
|
- [ ] Reporting
|
||||||
- [x] Events
|
- [x] Events
|
||||||
- [ ] Rooms
|
- [ ] Rooms
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
import "package:fast_immutable_collections/fast_immutable_collections.dart";
|
||||||
import "package:flutter/material.dart";
|
import "package:flutter/material.dart";
|
||||||
|
import "package:flutter/services.dart";
|
||||||
import "package:flutter_riverpod/flutter_riverpod.dart";
|
import "package:flutter_riverpod/flutter_riverpod.dart";
|
||||||
import "package:nexus/controllers/client_controller.dart";
|
import "package:nexus/controllers/client_controller.dart";
|
||||||
|
import "package:nexus/controllers/via_controller.dart";
|
||||||
import "package:nexus/models/room.dart";
|
import "package:nexus/models/room.dart";
|
||||||
|
|
||||||
class RoomMenu extends ConsumerWidget {
|
class RoomMenu extends ConsumerWidget {
|
||||||
|
|
@ -16,13 +18,18 @@ class RoomMenu extends ConsumerWidget {
|
||||||
|
|
||||||
return PopupMenuButton(
|
return PopupMenuButton(
|
||||||
itemBuilder: (_) => [
|
itemBuilder: (_) => [
|
||||||
// PopupMenuItem(
|
PopupMenuItem(
|
||||||
// onTap: () async {
|
onTap: () async {
|
||||||
// final link = await room.matrixToInviteLink();
|
final vias = ref.watch(ViaController.provider(room));
|
||||||
// await Clipboard.setData(ClipboardData(text: link.toString()));
|
|
||||||
// },
|
await Clipboard.setData(
|
||||||
// child: ListTile(leading: Icon(Icons.link), title: Text("Copy Link")),
|
ClipboardData(
|
||||||
// ),
|
text: "matrix:roomid/${room.metadata?.id.substring(1)}$vias)",
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: ListTile(leading: Icon(Icons.link), title: Text("Copy Link")),
|
||||||
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await client.markRead(room);
|
await client.markRead(room);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue