mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-06-02 03:58:36 +01:00
chore: debugging counter
This commit is contained in:
@@ -111,6 +111,9 @@ if (!Platform.isTV) {
|
|||||||
const url = getServerUrlFromStorage();
|
const url = getServerUrlFromStorage();
|
||||||
const user = getUserFromStorage();
|
const user = getUserFromStorage();
|
||||||
|
|
||||||
|
const c = storage.getNumber("notification_send_for_item_ids.count");
|
||||||
|
storage.set("notification_send_for_item_ids.count", (c || 0) + 1);
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"TaskManager ~ trigger ~ recently added notifications:",
|
"TaskManager ~ trigger ~ recently added notifications:",
|
||||||
token,
|
token,
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { storage } from "@/utils/mmkv";
|
|||||||
import { RECENTLY_ADDED_SENT_NOTIFICATIONS_ITEM_IDS_KEY } from "@/utils/recently-added-notifications";
|
import { RECENTLY_ADDED_SENT_NOTIFICATIONS_ITEM_IDS_KEY } from "@/utils/recently-added-notifications";
|
||||||
import * as TaskManager from "expo-task-manager";
|
import * as TaskManager from "expo-task-manager";
|
||||||
import * as BackgroundFetch from "expo-background-fetch";
|
import * as BackgroundFetch from "expo-background-fetch";
|
||||||
|
import { useMMKVNumber } from "react-native-mmkv";
|
||||||
|
|
||||||
export const RecentlyAddedNotificationsSettings: React.FC = ({ ...props }) => {
|
export const RecentlyAddedNotificationsSettings: React.FC = ({ ...props }) => {
|
||||||
const [settings, updateSettings] = useSettings();
|
const [settings, updateSettings] = useSettings();
|
||||||
@@ -28,6 +29,10 @@ export const RecentlyAddedNotificationsSettings: React.FC = ({ ...props }) => {
|
|||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
const [triggerCount, setTriggerCount] = useMMKVNumber(
|
||||||
|
"notification_send_for_item_ids.count"
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View className="mb-4" {...props}>
|
<View className="mb-4" {...props}>
|
||||||
<ListGroup title={"Recently Added Notifications"}>
|
<ListGroup title={"Recently Added Notifications"}>
|
||||||
@@ -39,6 +44,7 @@ export const RecentlyAddedNotificationsSettings: React.FC = ({ ...props }) => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
<ListItem title={`Trigger count (${triggerCount || 0})`} />
|
||||||
<ListItem
|
<ListItem
|
||||||
textColor="red"
|
textColor="red"
|
||||||
onPress={clearRecentlyAddedNotifications}
|
onPress={clearRecentlyAddedNotifications}
|
||||||
|
|||||||
Reference in New Issue
Block a user