jocosocial / tricordarr

A Twitarr client for Android
GNU General Public License v3.0
6 stars 3 forks source link

Tricordarr

A Twitarr client.

Quick Start

nvm install lts/hydrogen
nvm use lts/hydrogen (v18.20.4)

yarn install --immutable --immutable-cache

npx react-native start

npx uri-scheme open tricordarr:// --android

Notes

Upgrading

The React Native upgrade process is miserable. Don't do it. Or if you do, at least do it on a clean dedicated branch. npm install doesn't honor package-lock.json, you need npm clean-install for that.

npx @rnx-kit/align-deps --requirements react-native@0.72

Releasing

https://reactnative.dev/docs/signed-apk-android

Edit android/app/build.gradle with appropriate version info.

Version number plan:

cd android
./gradlew bundleRelease # To build AAB
./gradlew assembleRelease # For an APK
 adb -s device-name-here install ~/Projects/jocosocial/tricordarr/android/app/build/outputs/apk/release/app-release.apk

Navigation

// Push to ensure that back actually goes back somewhere useful.
rootNavigation.push(RootStackComponents.rootContentScreen, {
  screen: BottomTabComponents.lfgTab,
  params: {
    screen: LfgStackComponents.lfgOwnedScreen,
    // initial false needed here to enable the stack to popToTop on bottom button press.
    initial: false,
  },
})

Refresh

To refresh without glitches:

const onRefresh = async () => {
  setRefreshing(true);
  await Promise.all([refetch(), refetchPins()]);
  setRefreshing(false);
};

Android Studio

Open the android directory in Android Studio instead of the project root. It behaves better. Might be able to mark a different one as Project Root? https://stackoverflow.com/questions/70816347/i-cant-find-the-image-asset-option-in-android-studio

Icons

Notification: trim yes padding 0

Query

isLoading: no cache and in flight

isRefetching: Background refetch (excluding initial) and refetch().

refetch() will refetch even if within the staleTime. Backgrounds will not because that's the point of staleTime.

Layout Consideration