This commit is contained in:
@@ -67,6 +67,22 @@ class PlaceController extends AsyncNotifier<PlaceState> {
|
||||
|
||||
@override
|
||||
Future<PlaceState> build() async {
|
||||
if (!_api.hasTelegramAuth) {
|
||||
return const PlaceState(
|
||||
selectedTrait: PlaceTrait.calm,
|
||||
places: [],
|
||||
selectedPlaceId: null,
|
||||
currentUser: null,
|
||||
hasTelegramAuth: false,
|
||||
reviewDraft: VoiceReviewDraft(
|
||||
placeName: '',
|
||||
duration: Duration.zero,
|
||||
extractedTraits: {},
|
||||
evidence: [],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
final currentUser = await _api.authenticateTelegram();
|
||||
final places = await _api.fetchPlaces();
|
||||
return PlaceState(
|
||||
|
||||
Reference in New Issue
Block a user