mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Don't show save reminders in quick customization
This commit is contained in:
@@ -11,7 +11,11 @@ import { useInterval } from '../Utils/UseInterval';
|
||||
|
||||
export type UnsavedChangesAmount = 'none' | 'small' | 'significant' | 'risky';
|
||||
|
||||
type Props = {| onSave: () => Promise<void>, project: ?gdProject |};
|
||||
type Props = {|
|
||||
onSave: () => Promise<void>,
|
||||
project: ?gdProject,
|
||||
isInQuickCustomization: boolean,
|
||||
|};
|
||||
|
||||
const ONE_MINUTE = 60 * 1000;
|
||||
const MINIMUM_CHANGES_FOR_SIGNIFICANT_STATUS = 12;
|
||||
@@ -43,7 +47,11 @@ export const getUnsavedChangesAmount = (
|
||||
}
|
||||
};
|
||||
|
||||
const useSaveReminder = ({ onSave, project }: Props) => {
|
||||
const useSaveReminder = ({
|
||||
onSave,
|
||||
project,
|
||||
isInQuickCustomization,
|
||||
}: Props) => {
|
||||
const unsavedChanges = React.useContext(UnsavedChangesContext);
|
||||
const { currentlyRunningInAppTutorial } = React.useContext(
|
||||
InAppTutorialContext
|
||||
@@ -62,6 +70,7 @@ const useSaveReminder = ({ onSave, project }: Props) => {
|
||||
|
||||
if (
|
||||
!displaySaveReminderPreference.activated ||
|
||||
isInQuickCustomization ||
|
||||
currentlyRunningInAppTutorial ||
|
||||
!project
|
||||
) {
|
||||
|
@@ -2874,6 +2874,7 @@ const MainFrame = (props: Props) => {
|
||||
const renderSaveReminder = useSaveReminder({
|
||||
onSave: saveProject,
|
||||
project: currentProject,
|
||||
isInQuickCustomization: !!quickCustomizationDialogOpenedFromGameId,
|
||||
});
|
||||
|
||||
/**
|
||||
|
@@ -1002,11 +1002,7 @@ export default class SceneEditor extends React.Component<Props, State> {
|
||||
global: boolean,
|
||||
i18n: I18nType
|
||||
) => {
|
||||
const {
|
||||
project,
|
||||
layout,
|
||||
projectScopedContainersAccessor,
|
||||
} = this.props;
|
||||
const { project, layout, projectScopedContainersAccessor } = this.props;
|
||||
|
||||
const objectsContainersList = projectScopedContainersAccessor
|
||||
.get()
|
||||
|
Reference in New Issue
Block a user