mirror of
https://github.com/tooot-app/app
synced 2025-04-07 23:21:06 +02:00
Wrong side of fixing crash
This commit is contained in:
parent
50f95900b6
commit
02a90e84f3
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "tooot",
|
"name": "tooot",
|
||||||
"version": "4.8.1",
|
"version": "4.8.2",
|
||||||
"description": "tooot for Mastodon",
|
"description": "tooot for Mastodon",
|
||||||
"author": "xmflsct <me@xmflsct.com>",
|
"author": "xmflsct <me@xmflsct.com>",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
|
@ -38,7 +38,7 @@ const Root: React.FC<NativeStackScreenProps<TabPublicStackParamList, 'Tab-Public
|
|||||||
const previousSegment = getGlobalStorage.string('app.prev_public_segment')
|
const previousSegment = getGlobalStorage.string('app.prev_public_segment')
|
||||||
const segments: StorageGlobal['app.prev_public_segment'][] = ['Local', 'LocalPublic', 'Trending']
|
const segments: StorageGlobal['app.prev_public_segment'][] = ['Local', 'LocalPublic', 'Trending']
|
||||||
const [segment, setSegment] = useState<number>(
|
const [segment, setSegment] = useState<number>(
|
||||||
Math.min(
|
Math.max(
|
||||||
0,
|
0,
|
||||||
segments.findIndex(segment => segment === previousSegment)
|
segments.findIndex(segment => segment === previousSegment)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user