Fixed Android issues
This commit is contained in:
@ -32,6 +32,8 @@ class EntryController extends GetxController {
|
||||
final activeEvents = <Event>[].obs; //有効なイベントリスト
|
||||
|
||||
final teamMembers = <User>[].obs;
|
||||
final hasError = false.obs;
|
||||
final errorMessage = "".obs;
|
||||
|
||||
@override
|
||||
void onInit() async {
|
||||
@ -45,7 +47,7 @@ class EntryController extends GetxController {
|
||||
_apiService = await Get.putAsync(() => ApiService().init());
|
||||
} catch (e) {
|
||||
print('Error initializing ApiService: $e');
|
||||
Get.snackbar('Error', 'Failed to initialize API service');
|
||||
Get.snackbar('Error', 'APIサービスの初期化に失敗しました');
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,14 +66,16 @@ class EntryController extends GetxController {
|
||||
initializeEditMode(currentEntry.value!);
|
||||
} else {
|
||||
// 新規作成モードの場合、最初のイベントを選択
|
||||
if (events.isNotEmpty) {
|
||||
if (activeEvents.isNotEmpty) {
|
||||
selectedEvent.value = activeEvents.first;
|
||||
selectedDate.value = activeEvents.first.startDatetime;
|
||||
}
|
||||
}
|
||||
} catch(e) {
|
||||
print('Error initializing data: $e');
|
||||
Get.snackbar('Error', 'Failed to load initial data');
|
||||
// エラー状態を設定
|
||||
hasError.value = true;
|
||||
Get.snackbar('Error', '初期データの読み込みに失敗しました');
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user