fixup bugs related to PMP
Closes #25, as "Explain how to send messages using a certain PMP" is now added to the progress list.
This commit is contained in:
parent
1ca802c78b
commit
bd1d5ea745
3 changed files with 19 additions and 18 deletions
|
|
@ -120,7 +120,9 @@ 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
|
||||
- [ ] Setting per-message profiles for users (MSC4461)
|
||||
- [ ] Personas
|
||||
- [ ] Setting per-message profiles for users (MSC4461)
|
||||
- [ ] Explain how to send messages using a certain PMP
|
||||
- [ ] Devices
|
||||
- [ ] Viewing devices
|
||||
- [ ] Verifying devices
|
||||
|
|
|
|||
|
|
@ -62,12 +62,6 @@ class ChatBox extends HookConsumerWidget {
|
|||
fontWeight: FontWeight.bold,
|
||||
);
|
||||
|
||||
final canSendMessages = ref.watch(
|
||||
PowerLevelController.provider(
|
||||
PowerLevelConfig(eventType: "m.room.message"),
|
||||
),
|
||||
);
|
||||
|
||||
return Positioned(
|
||||
bottom: 0,
|
||||
left: 0,
|
||||
|
|
@ -92,7 +86,12 @@ class ChatBox extends HookConsumerWidget {
|
|||
child: Row(
|
||||
spacing: 8,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: canSendMessages
|
||||
children:
|
||||
ref.watch(
|
||||
PowerLevelController.provider(
|
||||
PowerLevelConfig(eventType: "m.room.message"),
|
||||
),
|
||||
)
|
||||
? [
|
||||
EmojiPickerButton(
|
||||
context: context,
|
||||
|
|
@ -101,7 +100,6 @@ class ChatBox extends HookConsumerWidget {
|
|||
),
|
||||
PopupMenuButton(
|
||||
tooltip: "Add media",
|
||||
enabled: canSendMessages,
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
child: ListTile(
|
||||
|
|
@ -145,7 +143,6 @@ class ChatBox extends HookConsumerWidget {
|
|||
"#": style,
|
||||
},
|
||||
builder: (context, key) => TextFormField(
|
||||
enabled: canSendMessages,
|
||||
maxLines: 12,
|
||||
minLines: 1,
|
||||
autofocus: true,
|
||||
|
|
@ -164,7 +161,7 @@ class ChatBox extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
IconButton(
|
||||
onPressed: !canSendMessages ? null : send,
|
||||
onPressed: send,
|
||||
icon: Icon(Icons.send),
|
||||
tooltip: "Send message",
|
||||
),
|
||||
|
|
|
|||
|
|
@ -365,13 +365,15 @@ class RoomChat extends HookConsumerWidget {
|
|||
text, {
|
||||
required shouldMention,
|
||||
required tags,
|
||||
}) => notifier.send(
|
||||
text,
|
||||
tags: tags,
|
||||
relationType: relationType.value,
|
||||
shouldMention: shouldMention,
|
||||
relation: relatedMessage.value,
|
||||
),
|
||||
}) => notifier
|
||||
.send(
|
||||
text,
|
||||
tags: tags,
|
||||
relationType: relationType.value,
|
||||
shouldMention: shouldMention,
|
||||
relation: relatedMessage.value,
|
||||
)
|
||||
.onError(showError),
|
||||
relationType: relationType.value,
|
||||
relatedMessage: relatedMessage.value,
|
||||
onDismiss: () => relatedMessage.value = null,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue