👽 The removal of external id

This commit is contained in:
2024-09-11 23:40:23 +08:00
parent bba38e6845
commit f3b2a2a0ac
12 changed files with 33 additions and 31 deletions

View File

@ -127,9 +127,8 @@ class _ChannelListWidgetState extends State<ChannelListWidget> {
: const EdgeInsets.symmetric(horizontal: 16);
if (item.type == 1) {
final otherside = item.members!
.where((e) => e.account.externalId != widget.selfId)
.first;
final otherside =
item.members!.where((e) => e.account.id != widget.selfId).first;
return ListTile(
leading: AccountAvatar(

View File

@ -176,7 +176,7 @@ class _ChannelMemberListPopupState extends State<ChannelMemberListPopup> {
IconButton(
color: Colors.red,
icon: const Icon(Icons.remove_circle),
onPressed: element.account.externalId == _accountId
onPressed: element.account.id == _accountId
? null
: () => removeMember(element),
),

View File

@ -41,8 +41,8 @@ class _ChatEventActionState extends State<ChatEventAction> {
setState(() => _isBusy = true);
setState(() {
_canModifyContent = auth.userProfile.value!['id'] ==
widget.item.sender.account.externalId;
_canModifyContent =
auth.userProfile.value!['id'] == widget.item.sender.account.id;
_isBusy = false;
});
}

View File

@ -35,7 +35,7 @@ class _PostActionState extends State<PostAction> {
setState(() {
_canModifyContent =
auth.userProfile.value!['id'] == widget.item.author.externalId;
auth.userProfile.value!['id'] == widget.item.author.id;
_isBusy = false;
});
}

View File

@ -173,7 +173,7 @@ class _RealmMemberListPopupState extends State<RealmMemberListPopup> {
IconButton(
color: Colors.red,
icon: const Icon(Icons.remove_circle),
onPressed: element.account.externalId == _accountId
onPressed: element.account.id == _accountId
? null
: () => removeMember(element),
),