Pop preview when clicking back
This commit is contained in:
parent
4a8b4c19e3
commit
f813cb5b6e
|
|
@ -198,4 +198,6 @@ abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||||
bool get isViewing => !isEditing && !isEmailing;
|
bool get isViewing => !isEditing && !isEmailing;
|
||||||
|
|
||||||
bool get isInSettings => currentRoute.contains('settings');
|
bool get isInSettings => currentRoute.contains('settings');
|
||||||
|
|
||||||
|
bool get isPreviewing => previewStack.isNotEmpty;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,11 @@ class MainScreen extends StatelessWidget {
|
||||||
final index = isEditing ? 0 : 1;
|
final index = isEditing ? 0 : 1;
|
||||||
HistoryRecord history;
|
HistoryRecord history;
|
||||||
|
|
||||||
|
if (state.uiState.isPreviewing) {
|
||||||
|
store.dispatch(PopPreviewStack());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = index; i < historyList.length; i++) {
|
for (int i = index; i < historyList.length; i++) {
|
||||||
final item = historyList[i];
|
final item = historyList[i];
|
||||||
if ([
|
if ([
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue