diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-04-24 16:36:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 16:36:05 -0500 |
commit | da8af38dcc23ea33c686714be2ce5f0bf0e65798 (patch) | |
tree | 78156a3b5803ccda6883e9e694ca79ccfdc40473 /src/lib/routes | |
parent | 9d8600c21387999f8621274c553d5385be0c92c7 (diff) | |
download | voidsky-da8af38dcc23ea33c686714be2ce5f0bf0e65798.tar.zst |
Android & visual fixes: color themes, repost icon, navigation, back handler, etc (#519)
* Switch android to use slide left/right animations on navigation * Bump the repost icon down by a pixel * Tune theme colors for contrast and darker bg on darkmode * Move back handler to a point in the init flow that leads to more consistent capture of events * Fix image share flow on android * Fix lint * Add todo about sharing not available * Drop the android slide animation because it's too slow * Fix 'flashes of white' in dark mode android
Diffstat (limited to 'src/lib/routes')
-rw-r--r-- | src/lib/routes/back-handler.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/routes/back-handler.ts b/src/lib/routes/back-handler.ts index feb928458..c4067c53e 100644 --- a/src/lib/routes/back-handler.ts +++ b/src/lib/routes/back-handler.ts @@ -1,11 +1,8 @@ import {BackHandler} from 'react-native' import {RootStoreModel} from 'state/index' -export function onBack(cb: () => boolean): () => void { - const subscription = BackHandler.addEventListener('hardwareBackPress', cb) - return () => subscription.remove() -} - export function init(store: RootStoreModel) { - onBack(() => store.shell.closeAnyActiveElement()) + BackHandler.addEventListener('hardwareBackPress', () => { + return store.shell.closeAnyActiveElement() + }) } |