[Perf] Default animation level: 2 → 1 (follow-up)
This commit is contained in:
parent
7df367ad6c
commit
856c8a68ea
@ -139,7 +139,7 @@ function SettingsPerformance({
|
|||||||
? INITIAL_PERFORMANCE_STATE_MIN
|
? INITIAL_PERFORMANCE_STATE_MIN
|
||||||
: (newLevel === ANIMATION_LEVEL_MED ? INITIAL_PERFORMANCE_STATE_MED : INITIAL_PERFORMANCE_STATE_MAX);
|
: (newLevel === ANIMATION_LEVEL_MED ? INITIAL_PERFORMANCE_STATE_MED : INITIAL_PERFORMANCE_STATE_MAX);
|
||||||
|
|
||||||
setSharedSettingOption({ animationLevel: newLevel as AnimationLevel });
|
setSharedSettingOption({ animationLevel: newLevel as AnimationLevel, wasAnimationLevelSetManually: true });
|
||||||
updatePerformanceSettings(performance);
|
updatePerformanceSettings(performance);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
|||||||
@ -130,6 +130,7 @@ addActionHandler('updatePerformanceSettings', (global, actions, payload): Action
|
|||||||
...settings.performance,
|
...settings.performance,
|
||||||
...payload,
|
...payload,
|
||||||
},
|
},
|
||||||
|
wasAnimationLevelSetManually: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
return global;
|
return global;
|
||||||
|
|||||||
@ -34,7 +34,7 @@ import { encryptSession } from '../util/passcode';
|
|||||||
import { onBeforeUnload, throttle } from '../util/schedulers';
|
import { onBeforeUnload, throttle } from '../util/schedulers';
|
||||||
import { hasStoredSession } from '../util/sessions';
|
import { hasStoredSession } from '../util/sessions';
|
||||||
import { addActionHandler, getGlobal } from './index';
|
import { addActionHandler, getGlobal } from './index';
|
||||||
import { INITIAL_GLOBAL_STATE } from './initialState';
|
import { INITIAL_GLOBAL_STATE, INITIAL_PERFORMANCE_STATE_MED } from './initialState';
|
||||||
import { clearGlobalForLockScreen, clearSharedStateForLockScreen } from './reducers';
|
import { clearGlobalForLockScreen, clearSharedStateForLockScreen } from './reducers';
|
||||||
import {
|
import {
|
||||||
selectChatLastMessageId,
|
selectChatLastMessageId,
|
||||||
@ -351,11 +351,9 @@ function unsafeMigrateCache(cached: GlobalState, initialState: GlobalState) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const cachedSharedSettings = cached.sharedState.settings;
|
const cachedSharedSettings = cached.sharedState.settings;
|
||||||
if (
|
if (!cachedSharedSettings.wasAnimationLevelSetManually) {
|
||||||
cachedSharedSettings.animationLevel !== ANIMATION_LEVEL_DEFAULT
|
|
||||||
&& !cachedSharedSettings.wasAnimationLevelSetManually
|
|
||||||
) {
|
|
||||||
cachedSharedSettings.animationLevel = ANIMATION_LEVEL_DEFAULT;
|
cachedSharedSettings.animationLevel = ANIMATION_LEVEL_DEFAULT;
|
||||||
|
cachedSharedSettings.performance = INITIAL_PERFORMANCE_STATE_MED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user