This commit is contained in:
@@ -120,11 +120,10 @@ class _MapContent extends StatelessWidget {
|
||||
child: _UserAvatar(
|
||||
user: state.currentUser,
|
||||
onAdminReviews: state.currentUser?.isAdmin == true
|
||||
? () => context.push('/admin/reviews')
|
||||
? () => context.push(MapflowRoutes.adminReviews)
|
||||
: null,
|
||||
onLogout: () {
|
||||
telegram_session.clearMapflowSession();
|
||||
placeCubit.load();
|
||||
telegram_session.reloadApp();
|
||||
},
|
||||
),
|
||||
@@ -225,12 +224,7 @@ class _MapContent extends StatelessWidget {
|
||||
}
|
||||
|
||||
void _openAddFlow(BuildContext context, LatLng? coordinate) {
|
||||
context.push(
|
||||
MapflowRoutes.addExperienceLocation(
|
||||
coordinate: coordinate,
|
||||
hasTelegramAuth: state.hasTelegramAuth,
|
||||
),
|
||||
);
|
||||
context.push(MapflowRoutes.addExperienceLocation(coordinate: coordinate));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -976,14 +970,9 @@ class _PlaceCarousel extends StatelessWidget {
|
||||
}
|
||||
|
||||
class AddExperienceFlow extends StatefulWidget {
|
||||
const AddExperienceFlow({
|
||||
super.key,
|
||||
required this.coordinate,
|
||||
required this.hasTelegramAuth,
|
||||
});
|
||||
const AddExperienceFlow({super.key, required this.coordinate});
|
||||
|
||||
final LatLng? coordinate;
|
||||
final bool hasTelegramAuth;
|
||||
|
||||
@override
|
||||
State<AddExperienceFlow> createState() => _AddExperienceFlowState();
|
||||
@@ -1137,19 +1126,22 @@ class _AddExperienceFlowState extends State<AddExperienceFlow> {
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = context.mapflowTokens;
|
||||
final controller = context.read<PlaceCubit>();
|
||||
final hasTelegramAuth = context.select(
|
||||
(PlaceCubit cubit) => cubit.state.placeState?.hasTelegramAuth ?? false,
|
||||
);
|
||||
final informationProgress = (_informationUnits / _minimumInformationUnits)
|
||||
.clamp(0.0, 1.0);
|
||||
final content = switch (_step) {
|
||||
0 => _VoiceStep(
|
||||
placeName: '',
|
||||
promptHints: _voicePromptHints,
|
||||
hasTelegramAuth: widget.hasTelegramAuth,
|
||||
hasTelegramAuth: hasTelegramAuth,
|
||||
informationProgress: informationProgress,
|
||||
isRecording: _recording,
|
||||
isSubmitting: _submitting,
|
||||
micAllowed: _micAllowed,
|
||||
liveLevel: _liveLevel,
|
||||
canContinue: widget.hasTelegramAuth && informationProgress >= 1,
|
||||
canContinue: hasTelegramAuth && informationProgress >= 1,
|
||||
onToggleRecording: _toggleRecording,
|
||||
onNext: () async {
|
||||
if (_recording) {
|
||||
|
||||
Reference in New Issue
Block a user