Fix old columns mode setting wrongly applied
Deprecate it more now
This commit is contained in:
parent
0c2d79c159
commit
48b505b382
|
@ -35,8 +35,9 @@ function NavMenu(props) {
|
||||||
// User may choose pin or not to pin Following
|
// User may choose pin or not to pin Following
|
||||||
// If user doesn't pin Following, we show it in the menu
|
// If user doesn't pin Following, we show it in the menu
|
||||||
const showFollowing =
|
const showFollowing =
|
||||||
(snapStates.settings.shortcutsColumnsMode ||
|
(snapStates.settings.shortcutsViewMode === 'multi-column' ||
|
||||||
snapStates.settings.shortcutsViewMode === 'multi-column') &&
|
(!snapStates.settings.shortcutsViewMode &&
|
||||||
|
snapStates.settings.shortcutsColumnsMode)) &&
|
||||||
!snapStates.shortcuts.find((pin) => pin.type === 'following');
|
!snapStates.shortcuts.find((pin) => pin.type === 'following');
|
||||||
|
|
||||||
const bindLongPress = useLongPress(
|
const bindLongPress = useLongPress(
|
||||||
|
|
|
@ -300,33 +300,6 @@ function ShortcutsSettings({ onClose }) {
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
{/* <select
|
|
||||||
value={snapStates.settings.shortcutsViewMode || 'float-button'}
|
|
||||||
onChange={(e) => {
|
|
||||||
states.settings.shortcutsViewMode = e.target.value;
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<option value="float-button">Floating button</option>
|
|
||||||
<option value="multi-column">Multi-column</option>
|
|
||||||
<option value="tab-menu-bar">Tab/Menu bar </option>
|
|
||||||
</select> */}
|
|
||||||
{/* <p>
|
|
||||||
<details>
|
|
||||||
<summary class="insignificant">
|
|
||||||
Experimental Multi-column mode
|
|
||||||
</summary>
|
|
||||||
<label>
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
checked={snapStates.settings.shortcutsColumnsMode}
|
|
||||||
onChange={(e) => {
|
|
||||||
states.settings.shortcutsColumnsMode = e.target.checked;
|
|
||||||
}}
|
|
||||||
/>{' '}
|
|
||||||
Show shortcuts in multiple columns instead of the floating button.
|
|
||||||
</label>
|
|
||||||
</details>
|
|
||||||
</p> */}
|
|
||||||
{shortcuts.length > 0 ? (
|
{shortcuts.length > 0 ? (
|
||||||
<ol class="shortcuts-list" ref={shortcutsListParent}>
|
<ol class="shortcuts-list" ref={shortcutsListParent}>
|
||||||
{shortcuts.filter(Boolean).map((shortcut, i) => {
|
{shortcuts.filter(Boolean).map((shortcut, i) => {
|
||||||
|
|
|
@ -25,8 +25,8 @@ function Shortcuts() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
settings.shortcutsColumnsMode ||
|
settings.shortcutsViewMode === 'multi-column' ||
|
||||||
settings.shortcutsViewMode === 'multi-column'
|
(!settings.shortcutsViewMode && settings.shortcutsColumnsMode)
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,9 @@ function Home() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{(snapStates.settings.shortcutsColumnsMode ||
|
{(snapStates.settings.shortcutsViewMode === 'multi-column' ||
|
||||||
snapStates.settings.shortcutsViewMode === 'multi-column') &&
|
(!snapStates.settings.shortcutsViewMode &&
|
||||||
|
snapStates.settings.shortcutsColumnsMode)) &&
|
||||||
!!snapStates.shortcuts?.length ? (
|
!!snapStates.shortcuts?.length ? (
|
||||||
<Columns />
|
<Columns />
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -71,8 +71,9 @@ export function initStates() {
|
||||||
store.account.get('settings-autoRefresh') ?? false;
|
store.account.get('settings-autoRefresh') ?? false;
|
||||||
states.settings.shortcutsViewMode =
|
states.settings.shortcutsViewMode =
|
||||||
store.account.get('settings-shortcutsViewMode') ?? null;
|
store.account.get('settings-shortcutsViewMode') ?? null;
|
||||||
states.settings.shortcutsColumnsMode =
|
if (store.account.get('settings-shortcutsColumnsMode')) {
|
||||||
store.account.get('settings-shortcutsColumnsMode') ?? false;
|
states.settings.shortcutsColumnsMode = true;
|
||||||
|
}
|
||||||
states.settings.boostsCarousel =
|
states.settings.boostsCarousel =
|
||||||
store.account.get('settings-boostsCarousel') ?? true;
|
store.account.get('settings-boostsCarousel') ?? true;
|
||||||
states.settings.contentTranslation =
|
states.settings.contentTranslation =
|
||||||
|
@ -99,9 +100,6 @@ subscribe(states, (changes) => {
|
||||||
if (path.join('.') === 'settings.boostsCarousel') {
|
if (path.join('.') === 'settings.boostsCarousel') {
|
||||||
store.account.set('settings-boostsCarousel', !!value);
|
store.account.set('settings-boostsCarousel', !!value);
|
||||||
}
|
}
|
||||||
if (path.join('.') === 'settings.shortcutsColumnsMode') {
|
|
||||||
store.account.set('settings-shortcutsColumnsMode', !!value);
|
|
||||||
}
|
|
||||||
if (path.join('.') === 'settings.shortcutsViewMode') {
|
if (path.join('.') === 'settings.shortcutsViewMode') {
|
||||||
store.account.set('settings-shortcutsViewMode', value);
|
store.account.set('settings-shortcutsViewMode', value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue