Browse Source

show isRemote to UI

pull/18/head
Sun 4 years ago
parent
commit
5474463bfe
  1. 4
      lib/apps/group_chat/models.dart
  2. 4
      lib/apps/group_chat/provider.dart
  3. 1
      src/apps/group_chat/models.rs

4
lib/apps/group_chat/models.dart

@ -104,6 +104,7 @@ class GroupChat { @@ -104,6 +104,7 @@ class GroupChat {
bool isOk;
bool isClosed;
bool isNeedAgree;
bool isRemote;
GroupChat.fromList(List params):
this.id = params[0],
@ -115,7 +116,8 @@ class GroupChat { @@ -115,7 +116,8 @@ class GroupChat {
this.bio = params[6],
this.isOk = params[7],
this.isClosed = params[8],
this.isNeedAgree = params[9];
this.isNeedAgree = params[9],
this.isRemote = params[10];
Avatar showAvatar({double width = 45.0}) {
final avatar = Global.avatarPath + this.gid + '.png';

4
lib/apps/group_chat/provider.dart

@ -142,7 +142,9 @@ class GroupChatProvider extends ChangeNotifier { @@ -142,7 +142,9 @@ class GroupChatProvider extends ChangeNotifier {
messageCreate(MessageType mtype, String content) {
final gcd = this.activedGroup!.gid;
rpc.send('group-chat-message-create', [gcd, this.actived!, mtype.toInt(), content]);
rpc.send('group-chat-message-create', [
gcd, this.actived!, this.activedGroup!.isRemote, mtype.toInt(), content
]);
}
close(int id) {

1
src/apps/group_chat/models.rs

@ -249,6 +249,7 @@ impl GroupChat { @@ -249,6 +249,7 @@ impl GroupChat {
self.is_ok,
self.is_closed,
self.is_need_agree,
self.is_remote,
])
}

Loading…
Cancel
Save