diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md deleted file mode 100644 index 5e527e3..0000000 --- a/DEVELOPMENT.md +++ /dev/null @@ -1,11 +0,0 @@ -## Build instructions - -CBuild instructions can be found in [README.md](./README.md#build-it-yourself). - -## Updating Gomuks - -You can run the following command to update the Gomuks submodule: - -```sh -git submodule update --remote -``` diff --git a/README.md b/README.md index 2c44fc8..50060d0 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend. - [x] HTML/Markdown - [x] Replies - [x] Choose ping on/off - - [x] Per message profiles + - [ ] Per message profiles - [ ] Attachments - [ ] Commands with [MSC4391](https://github.com/matrix-org/matrix-spec-proposals/pull/4391) - [x] Mentions @@ -120,9 +120,6 @@ A simple and user-friendly Matrix client made with Flutter and a Gomuks backend. - [ ] Align your message bubbles to left or right - [ ] Show media by default - [ ] Dynamic Theming - - [ ] Personas - - [ ] Setting per-message profiles for users (MSC4461) - - [ ] Explain how to send messages using a certain PMP - [ ] Devices - [ ] Viewing devices - [ ] Verifying devices @@ -221,8 +218,6 @@ Run the app: flutter run ``` -Development instructions can be found in [DEVELOPMENT.md](./DEVELOPMENT.md). - ## Community Join the [Nexus Client Matrix Room](https://matrix.to/#/#nexus:federated.nexus) for questions or help with developing or using Nexus Client. diff --git a/gomuks b/gomuks index fbe6fdb..daa0ba0 160000 --- a/gomuks +++ b/gomuks @@ -1 +1 @@ -Subproject commit fbe6fdbaabeaae46fb4c03e0d18260941f235d49 +Subproject commit daa0ba028e7d89ba9fc7580fc8099348e6145cb3 diff --git a/lib/widgets/chat_page/composer/chat_box.dart b/lib/widgets/chat_page/composer/chat_box.dart index ac44aa3..dee52e1 100644 --- a/lib/widgets/chat_page/composer/chat_box.dart +++ b/lib/widgets/chat_page/composer/chat_box.dart @@ -62,6 +62,12 @@ class ChatBox extends HookConsumerWidget { fontWeight: FontWeight.bold, ); + final canSendMessages = ref.watch( + PowerLevelController.provider( + PowerLevelConfig(eventType: "m.room.message"), + ), + ); + return Positioned( bottom: 0, left: 0, @@ -86,12 +92,7 @@ class ChatBox extends HookConsumerWidget { child: Row( spacing: 8, mainAxisAlignment: MainAxisAlignment.center, - children: - ref.watch( - PowerLevelController.provider( - PowerLevelConfig(eventType: "m.room.message"), - ), - ) + children: canSendMessages ? [ EmojiPickerButton( context: context, @@ -100,6 +101,7 @@ class ChatBox extends HookConsumerWidget { ), PopupMenuButton( tooltip: "Add media", + enabled: canSendMessages, itemBuilder: (context) => [ PopupMenuItem( child: ListTile( @@ -143,6 +145,7 @@ class ChatBox extends HookConsumerWidget { "#": style, }, builder: (context, key) => TextFormField( + enabled: canSendMessages, maxLines: 12, minLines: 1, autofocus: true, @@ -161,7 +164,7 @@ class ChatBox extends HookConsumerWidget { ), ), IconButton( - onPressed: send, + onPressed: !canSendMessages ? null : send, icon: Icon(Icons.send), tooltip: "Send message", ), diff --git a/lib/widgets/chat_page/room_chat.dart b/lib/widgets/chat_page/room_chat.dart index 1a1cfdd..7fb3f8f 100644 --- a/lib/widgets/chat_page/room_chat.dart +++ b/lib/widgets/chat_page/room_chat.dart @@ -365,15 +365,13 @@ class RoomChat extends HookConsumerWidget { text, { required shouldMention, required tags, - }) => notifier - .send( - text, - tags: tags, - relationType: relationType.value, - shouldMention: shouldMention, - relation: relatedMessage.value, - ) - .onError(showError), + }) => notifier.send( + text, + tags: tags, + relationType: relationType.value, + shouldMention: shouldMention, + relation: relatedMessage.value, + ), relationType: relationType.value, relatedMessage: relatedMessage.value, onDismiss: () => relatedMessage.value = null, diff --git a/linux/nix/pkg/gomuks.nix b/linux/nix/pkg/gomuks.nix index 86e826f..1bc92bf 100644 --- a/linux/nix/pkg/gomuks.nix +++ b/linux/nix/pkg/gomuks.nix @@ -11,7 +11,7 @@ buildGoModule (finalAttrs: { src = "${src}/gomuks"; - vendorHash = "sha256-9FsZkE8JmFDQyigQAaFn7i2OsH6Q8yFigPFt/l2FIoU="; + vendorHash = "sha256-zBDfBZqUoHIfZ0AajZEvSBbskjpFB7yIsomt0KYDo7Y="; buildPhase = '' runHook preBuild