From 9f8064ded4a26a2c0cb42f3e1d8cbebef67c1787 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Mon, 28 Aug 2023 00:27:10 +0200 Subject: [PATCH] Fix Android crashes using PlatformColor --- package.json | 2 +- src/utils/styles/themes.ts | 36 ++++++++++++------------------------ 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index d2ee9ef6..d2d6784a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tooot", - "version": "4.10.2", + "version": "4.10.3", "description": "tooot for Mastodon", "author": "xmflsct ", "license": "GPL-3.0-or-later", diff --git a/src/utils/styles/themes.ts b/src/utils/styles/themes.ts index 7ee34c71..cc18e6d9 100644 --- a/src/utils/styles/themes.ts +++ b/src/utils/styles/themes.ts @@ -97,30 +97,18 @@ const themeColors: { }, separator: { - light: PlatformColor( - Platform.select({ - ios: 'separator', - android: '?android:attr/dividerVertical', - default: 'rgb(180, 180, 180)' - }), - 'rgb(180, 180, 180)' - ) as unknown as string, - dark_lighter: PlatformColor( - Platform.select({ - ios: 'separator', - android: '?android:attr/dividerVertical', - default: 'rgb(90, 90, 90)' - }), - 'rgb(90, 90, 90)' - ) as unknown as string, - dark_darker: PlatformColor( - Platform.select({ - ios: 'separator', - android: '?android:attr/dividerVertical', - default: 'rgb(90, 90, 90)' - }), - 'rgb(90, 90, 90)' - ) as unknown as string + light: Platform.select({ + ios: PlatformColor('separator') as unknown as string, + default: 'rgb(180, 180, 180)' + }), + dark_lighter: Platform.select({ + ios: PlatformColor('separator') as unknown as string, + default: 'rgb(90, 90, 90)' + }), + dark_darker: Platform.select({ + ios: PlatformColor('separator') as unknown as string, + default: 'rgb(90, 90, 90)' + }) }, shimmerDefault: {