Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .yarn/install-state.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ android {
applicationId defaultApplicationId
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 38
versionName '3.3.1'
versionCode 39
versionName '3.3.2'
}
signingConfigs {
debug {
Expand Down
27 changes: 14 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lemonderssreader",
"version": "3.3.1",
"version": "3.3.2",
"author": {
"name": "Matthieu BACHELIER"
},
Expand All @@ -15,15 +15,15 @@
},
"dependencies": {
"@codeherence/react-native-header": "^0.14.0",
"@gorhom/bottom-sheet": "^5.1.6",
"@gorhom/bottom-sheet": "^5.1.8",
"@pchmn/expo-material3-theme": "^1.3.2",
"@react-native-async-storage/async-storage": "^2.2.0",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-navigation/bottom-tabs": "^7.4.2",
"@react-navigation/native": "^7.1.14",
"@react-navigation/native-stack": "^7.3.21",
"@react-navigation/bottom-tabs": "^7.4.6",
"@react-navigation/native": "^7.1.17",
"@react-navigation/native-stack": "^7.3.25",
"@shopify/flash-list": "^1.8.3",
"@tanstack/react-query": "^5.83.0",
"@tanstack/react-query": "^5.84.2",
"expo": "53.0.11",
"html-entities": "^2.6.0",
"html-react-parser": "^5.2.6",
Expand All @@ -35,23 +35,24 @@
"react-content-loader": "^7.1.1",
"react-native": "0.79.3",
"react-native-device-info": "^14.0.4",
"react-native-gesture-handler": "^2.27.1",
"react-native-gesture-handler": "^2.27.2",
"react-native-localize": "^3.5.1",
"react-native-material-you-colors": "^0.1.2",
"react-native-media-console": "^2.2.4",
"react-native-paper": "^5.14.5",
"react-native-reanimated": "^3.18.0",
"react-native-reanimated-carousel": "^4.0.3",
"react-native-safe-area-context": "^5.5.2",
"react-native-screens": "^4.11.1",
"react-native-svg": "^15.12.0",
"react-native-vector-icons": "^10.2.0",
"react-native-screens": "^4.13.1",
"react-native-svg": "^15.12.1",
"react-native-vector-icons": "^10.3.0",
"react-native-video": "^6.16.1",
"react-native-webview": "^13.15.0"
},
"devDependencies": {
"@babel/core": "^7.28.0",
"@babel/preset-env": "^7.28.0",
"@babel/runtime": "^7.27.6",
"@babel/runtime": "^7.28.2",
"@react-native-community/cli": "18.0.0",
"@react-native-community/cli-platform-android": "18.0.0",
"@react-native-community/cli-platform-ios": "18.0.0",
Expand All @@ -61,15 +62,15 @@
"@react-native/typescript-config": "0.79.3",
"@tsconfig/react-native": "^3.0.6",
"@types/i18n-js": "^4.0.1",
"@types/react": "^19.1.8",
"@types/react": "^19.1.9",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "19.0.0",
"babel-jest": "^29.7.0",
"eslint": "^8.1.0",
"jest": "^29.7.0",
"prettier": "^3.6.2",
"react-test-renderer": "19.0.0",
"typescript": "5.8.3"
"typescript": "5.9.2"
},
"engines": {
"node": ">=18"
Expand Down
17 changes: 16 additions & 1 deletion src/context/useSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface UseSettingsType {
theme: Theme
getFavorites: () => Promise<ArticleHeader[]>
hasFavorite: (link: string) => Promise<boolean>
removeCategory: (c: MenuEntry) => Promise<void>
setCurrentCategory: (c: MenuEntry) => Promise<void>
setDynamicStatusBarColor: (b: boolean) => Promise<void>
setFeed: (feed: Category[]) => Promise<void>
Expand All @@ -36,7 +37,8 @@ export interface UseSettingsType {
const defaultMenuEntry: MenuEntry = {
cat: 'news',
name: 'latestNews',
uri: 'rss/une.xml'
uri: 'rss/une.xml',
isTranslatable: true
}

// Default values
Expand Down Expand Up @@ -175,6 +177,18 @@ export const useSettings = (): UseSettingsType => {
setLastFiveCategories(lastCategories)
}

const removeCategory = async (m: MenuEntry): Promise<void> => {
const lastCategoriesStr = await AsyncStorage.getItem(KEYS.LAST_FIVE_CATEGORIES)
let lastCategories: MenuEntry[] = lastCategoriesStr ? JSON.parse(lastCategoriesStr) : []
lastCategories = lastCategories.filter((category: MenuEntry) => category.uri !== m.uri)
if (lastCategories.length > 0) {
await AsyncStorage.setItem(KEYS.LAST_SECTION_ENTRY, JSON.stringify(lastCategories[0]))
}
const newestLastCategoriesStr = JSON.stringify(lastCategories)
await AsyncStorage.setItem(KEYS.LAST_FIVE_CATEGORIES, newestLastCategoriesStr)
setLastFiveCategories(lastCategories)
}

/**
*
* @param b
Expand Down Expand Up @@ -278,6 +292,7 @@ export const useSettings = (): UseSettingsType => {
theme,
getFavorites,
hasFavorite,
removeCategory,
setCurrentCategory,
setDynamicStatusBarColor,
setFeed,
Expand Down
Loading