Skip to content

Commit

Permalink
Handle jika pengaturan discord belum diatur
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderJava committed Jul 14, 2023
1 parent 5b468a5 commit 6d1a6ab
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class _SettingDiscordPageState extends State<SettingDiscordPage> {

var isLoadingButton = false;
var discordChannelId = '';
var isPreparingSuccess = false;

@override
void setState(VoidCallback fn) {
Expand Down Expand Up @@ -65,6 +66,7 @@ class _SettingDiscordPageState extends State<SettingDiscordPage> {
return;
}
} else if (state is SuccessLoadKvSettingState) {
isPreparingSuccess = true;
discordChannelId = state.response?.discordChannelId ?? '';
controllerDiscordChannelId.text = discordChannelId;
} else if (state is FailureSnackBarSettingState) {
Expand Down Expand Up @@ -101,7 +103,7 @@ class _SettingDiscordPageState extends State<SettingDiscordPage> {
} else if (state is LoadingCenterSettingState) {
return const WidgetCustomCircularProgressIndicator();
}
return discordChannelId.isEmpty ? Container() : buildWidgetForm();
return !isPreparingSuccess ? Container() : buildWidgetForm();
},
),
),
Expand Down

0 comments on commit 6d1a6ab

Please sign in to comment.