diff --git a/App.tsx b/App.tsx
index 07fb73c..a0065cb 100644
--- a/App.tsx
+++ b/App.tsx
@@ -17,6 +17,7 @@ import FatalError from "./FatalError";
import { AppDataSource } from "./data-source";
import { settingsRepo } from "./db";
import { ThemeContext } from "./use-theme";
+import TimerProgress from "./TimerProgress";
export const CombinedDefaultTheme = {
...NavigationDefaultTheme,
@@ -117,6 +118,7 @@ const App = () => {
+
);
};
diff --git a/AppDrawer.tsx b/AppDrawer.tsx
index e6c3e91..83ddf48 100644
--- a/AppDrawer.tsx
+++ b/AppDrawer.tsx
@@ -9,7 +9,6 @@ import PlanList from "./PlanList";
import SetList from "./SetList";
import SettingsPage from "./SettingsPage";
import TimerPage from "./TimerPage";
-import TimerProgress from "./TimerProgress";
import WeightList from "./WeightList";
const Drawer = createDrawerNavigator();
@@ -24,63 +23,60 @@ export default function AppDrawer({
const { dark } = useTheme();
return (
- <>
-
+ }}
+ />
+ }}
+ />
+ }}
+ />
+ ,
}}
- initialRouteName={
- (route.params.startup as keyof DrawerParams) || "History"
- }
- >
- }}
- />
- }}
- />
- }}
- />
- ,
- }}
- />
- }}
- />
- }}
- />
- ,
- }}
- />
- }}
- />
-
-
- >
+ />
+ }}
+ />
+ }}
+ />
+ ,
+ }}
+ />
+ }}
+ />
+
);
}
diff --git a/TimerProgress.tsx b/TimerProgress.tsx
index 2b52b10..db53f9b 100644
--- a/TimerProgress.tsx
+++ b/TimerProgress.tsx
@@ -1,24 +1,21 @@
-import { useFocusEffect } from "@react-navigation/native";
-import { useCallback, useState } from "react";
+import { useEffect, useState } from "react";
import { ProgressBar } from "react-native-paper";
-import { emitter } from "./emitter";
import { TickEvent } from "./TimerPage";
+import { emitter } from "./emitter";
export default function TimerProgress() {
const [progress, setProgress] = useState(0);
- useFocusEffect(
- useCallback(() => {
- const description = emitter.addListener(
- "tick",
- ({ minutes, seconds }: TickEvent) => {
- setProgress((Number(minutes) * 60 + Number(seconds)) / 210);
- console.log({ minutes, seconds });
- }
- );
- return description.remove;
- }, [])
- );
+ useEffect(() => {
+ const description = emitter.addListener(
+ "tick",
+ ({ minutes, seconds }: TickEvent) => {
+ setProgress((Number(minutes) * 60 + Number(seconds)) / 210);
+ console.log({ minutes, seconds });
+ }
+ );
+ return description.remove;
+ }, []);
if (progress === 0) return null;
diff --git a/android/app/build.gradle b/android/app/build.gradle
index 8ff021c..dbfe153 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -85,8 +85,8 @@ android {
applicationId "com.massive"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
- versionCode 36216
- versionName "2.1"
+ versionCode 36217
+ versionName "2.2"
}
signingConfigs {
release {
diff --git a/package.json b/package.json
index b3793bd..42164a7 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "massive",
- "version": "2.1",
+ "version": "2.2",
"private": true,
"license": "GPL-3.0-only",
"scripts": {