👽 The removal of external id
This commit is contained in:
@@ -204,9 +204,8 @@ class _ChannelChatScreenState extends State<ChannelChatScreen>
|
||||
String? placeholder;
|
||||
|
||||
if (_channel?.type == 1) {
|
||||
final otherside = _channel!.members!
|
||||
.where((e) => e.account.externalId != _accountId)
|
||||
.first;
|
||||
final otherside =
|
||||
_channel!.members!.where((e) => e.account.id != _accountId).first;
|
||||
title = otherside.account.nick;
|
||||
placeholder = 'messageInputPlaceholder'.trParams(
|
||||
{'channel': '@${otherside.account.name}'},
|
||||
|
@@ -43,8 +43,7 @@ class _ChannelDetailScreenState extends State<ChannelDetailScreen> {
|
||||
void checkOwner() async {
|
||||
final AuthProvider auth = Get.find();
|
||||
setState(() {
|
||||
_isOwned =
|
||||
auth.userProfile.value!['id'] == widget.channel.account.externalId;
|
||||
_isOwned = auth.userProfile.value!['id'] == widget.channel.account.id;
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -102,6 +102,9 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
|
||||
try {
|
||||
_signRecord = await _dailySign.signToday();
|
||||
_dailySign.listLastRecord(30).then((value) {
|
||||
setState(() => _signRecordHistory = value);
|
||||
});
|
||||
} catch (e) {
|
||||
context.showErrorDialog(e);
|
||||
}
|
||||
@@ -201,20 +204,22 @@ class _DashboardScreenState extends State<DashboardScreen> {
|
||||
icon: const Icon(Icons.local_fire_department),
|
||||
onPressed: _signingDaily ? null : _signDaily,
|
||||
)
|
||||
: IconButton(
|
||||
tooltip: 'dailySignHistoryAction'.tr,
|
||||
icon: const Icon(Icons.history),
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) =>
|
||||
DailySignHistoryChartDialog(
|
||||
data: _signRecordHistory,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
: (_signRecordHistory?.isEmpty ?? true)
|
||||
? const SizedBox.shrink()
|
||||
: IconButton(
|
||||
tooltip: 'dailySignHistoryAction'.tr,
|
||||
icon: const Icon(Icons.history),
|
||||
onPressed: () {
|
||||
showDialog(
|
||||
context: context,
|
||||
useRootNavigator: true,
|
||||
builder: (context) =>
|
||||
DailySignHistoryChartDialog(
|
||||
data: _signRecordHistory,
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
Reference in New Issue
Block a user