Skip to content

Commit 6d1a6ab

Browse files
committed
Handle jika pengaturan discord belum diatur
1 parent 5b468a5 commit 6d1a6ab

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/feature/presentation/page/setting_discord/setting_discord_page.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class _SettingDiscordPageState extends State<SettingDiscordPage> {
3131

3232
var isLoadingButton = false;
3333
var discordChannelId = '';
34+
var isPreparingSuccess = false;
3435

3536
@override
3637
void setState(VoidCallback fn) {
@@ -65,6 +66,7 @@ class _SettingDiscordPageState extends State<SettingDiscordPage> {
6566
return;
6667
}
6768
} else if (state is SuccessLoadKvSettingState) {
69+
isPreparingSuccess = true;
6870
discordChannelId = state.response?.discordChannelId ?? '';
6971
controllerDiscordChannelId.text = discordChannelId;
7072
} else if (state is FailureSnackBarSettingState) {
@@ -101,7 +103,7 @@ class _SettingDiscordPageState extends State<SettingDiscordPage> {
101103
} else if (state is LoadingCenterSettingState) {
102104
return const WidgetCustomCircularProgressIndicator();
103105
}
104-
return discordChannelId.isEmpty ? Container() : buildWidgetForm();
106+
return !isPreparingSuccess ? Container() : buildWidgetForm();
105107
},
106108
),
107109
),

0 commit comments

Comments
 (0)