Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
eec4710
feat(athkar): add Hisn al-Muslim database with FTS5 search
F2had Mar 29, 2026
31f364a
feat(my-athkar): add data layer — types, services, store, localization
F2had Mar 29, 2026
2318681
feat(my-athkar): add UI components and third tab integration
F2had Mar 29, 2026
bf60295
fix(my-athkar): use Asset.loadAsync + File.copy pattern for bundled D…
F2had Mar 29, 2026
d1d7a72
fix(my-athkar): detect and replace empty/corrupt DB from failed prior…
F2had Mar 29, 2026
44fe496
fix(my-athkar): checkpoint WAL before close so bundled .db is self-co…
F2had Mar 29, 2026
572f585
fix(my-athkar): use version marker to detect and replace stale DB copies
F2had Mar 29, 2026
df8fbc9
fix(my-athkar): use Button.Text compound component for proper color i…
F2had Mar 29, 2026
2c700c9
feat(my-athkar): rework UX — category cards, checkbox selection, swip…
F2had Mar 29, 2026
59a8eff
fix(my-athkar): batch initialize into single set() to prevent concurr…
F2had Mar 29, 2026
902a3d6
fix(my-athkar): remove SwipeableMyAthkarCard to fix Reanimated confli…
F2had Mar 29, 2026
01c487e
feat(my-athkar): group by category, category detail view, language ga…
F2had Mar 29, 2026
00a6942
fix(my-athkar): lazy-render sheets to fix Reanimated error, add long-…
F2had Mar 29, 2026
b46c47d
fix(my-athkar): remove delete from detail sheet, fix RTL text alignment
F2had Mar 29, 2026
f11c563
fix(my-athkar): group search results by category, language-aware text…
F2had Mar 29, 2026
8873c4a
fix(my-athkar): remove manual RTL textAlign, let RN layout system han…
F2had Mar 29, 2026
7f6edb0
fix(my-athkar): use flex-start for add button so it respects RTL layout
F2had Mar 29, 2026
d6de5f2
fix(my-athkar): set explicit text color on search input for light mod…
F2had Mar 29, 2026
5bf8596
fix(my-athkar): add proper Arabic line heights matching AthkarTextDis…
F2had Mar 29, 2026
a7f64f8
fix(my-athkar): remove line truncation from athkar card to show full …
F2had Mar 29, 2026
ec6653a
fix(my-athkar): improve card design — remove redundant category label…
F2had Mar 29, 2026
9add2c4
fix(my-athkar): toggle selection in search — tap selected item to uns…
F2had Mar 29, 2026
61b5834
fix(my-athkar): match search item text display to card — textAlign le…
F2had Mar 29, 2026
11721f3
chore: bump iOS and Android native version to 2.7.5
F2had Mar 29, 2026
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
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "2.7.0"
versionName "2.7.5"

buildConfigField "String", "REACT_NATIVE_RELEASE_LEVEL", "\"${findProperty('reactNativeReleaseLevel') ?: 'stable'}\""
}
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"name": "nedaa",
"slug": "nedaa",
"version": "2.7.0",
"version": "2.7.5",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
Expand Down
Binary file added assets/db/hisn-muslim.db
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/nedaa/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>2.7.0</string>
<string>2.7.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand Down
2 changes: 2 additions & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const config = getSentryExpoConfig(__dirname);
// };
// };

config.resolver.assetExts.push("db");

const configWithMinifier = {
...config,
transformer: {
Expand Down
186 changes: 186 additions & 0 deletions src/components/athkar/AthkarDetailSheet.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
import { FC } from "react";
import { useTranslation } from "react-i18next";

// Components
import {
Actionsheet,
ActionsheetBackdrop,
ActionsheetContent,
ActionsheetDragIndicator,
ActionsheetDragIndicatorWrapper,
ActionsheetScrollView,
} from "@/components/ui/actionsheet";
import { Box } from "@/components/ui/box";
import { Text } from "@/components/ui/text";
import { HStack } from "@/components/ui/hstack";
import { VStack } from "@/components/ui/vstack";
import { Pressable } from "@/components/ui/pressable";
import { Icon } from "@/components/ui/icon";

// Icons
import { Minus, Plus } from "lucide-react-native";

// Stores
import { useMyAthkarStore } from "@/stores/my-athkar";

// Hooks
import { useHaptic } from "@/hooks/useHaptic";

// Utils
import { formatNumberToLocale } from "@/utils/number";

// Types
import type { MyAthkarProgress } from "@/types/hisnMuslim";

type Props = {
isOpen: boolean;
onClose: () => void;
myAthkarId: number | null;
arabicText: string;
transliteration: string;
translation: string;
categoryTitle: string;
progress: MyAthkarProgress | null;
};

const AthkarDetailSheet: FC<Props> = ({
isOpen,
onClose,
myAthkarId,
arabicText,
transliteration,
translation,
categoryTitle,
progress,
}) => {
const { t } = useTranslation();
const { incrementCount, decrementCount } = useMyAthkarStore();
const hapticSelection = useHaptic("selection");
const hapticSuccess = useHaptic("success");

if (!myAthkarId || !progress) return null;

const { currentCount, totalCount, completed } = progress;

const handleIncrement = () => {
if (completed) return;
hapticSelection();
incrementCount(myAthkarId);
if (currentCount + 1 >= totalCount) {
hapticSuccess();
}
};

return (
<Actionsheet isOpen={isOpen} onClose={onClose} snapPoints={[80]}>
<ActionsheetBackdrop />
<ActionsheetContent>
<ActionsheetDragIndicatorWrapper>
<ActionsheetDragIndicator />
</ActionsheetDragIndicatorWrapper>

<ActionsheetScrollView>
<VStack gap="$4" padding="$4">
{/* Category */}
<Text size="sm" color="$typographySecondary">
{categoryTitle}
</Text>

{/* Arabic Text */}
<Box padding="$4" borderRadius="$4" backgroundColor="$backgroundSecondary">
<Text
size="2xl"
style={{ writingDirection: "rtl", lineHeight: 40 }}
textAlign="right"
color="$typography">
{arabicText}
</Text>
</Box>

{/* Transliteration */}
{transliteration !== "" && (
<VStack gap="$1">
<Text size="xs" fontWeight="600" color="$typographySecondary">
{t("athkar.myAthkar.transliteration")}
</Text>
<Text size="md" color="$typographySecondary" fontStyle="italic">
{transliteration}
</Text>
</VStack>
)}

{/* Translation */}
{translation !== "" && (
<VStack gap="$1">
<Text size="xs" fontWeight="600" color="$typographySecondary">
{t("athkar.myAthkar.translation")}
</Text>
<Text size="md" color="$typography">
{translation}
</Text>
</VStack>
)}

{/* Counter */}
<Box
padding="$4"
borderRadius="$6"
backgroundColor={completed ? "$backgroundSuccess" : "$backgroundSecondary"}>
<HStack justifyContent="center" alignItems="center" gap="$6">
<Pressable
onPress={() => {
decrementCount(myAthkarId);
hapticSelection();
}}
disabled={currentCount <= 0}
width={56}
height={56}
borderRadius={999}
backgroundColor="$backgroundMuted"
alignItems="center"
justifyContent="center"
opacity={currentCount <= 0 ? 0.3 : 1}
accessibilityRole="button"
accessibilityLabel="Decrease count">
<Icon as={Minus} size="lg" color="$typography" />
</Pressable>

<Pressable
onPress={handleIncrement}
disabled={completed}
accessibilityRole="button"
accessibilityLabel={`${currentCount} of ${totalCount}`}>
<VStack alignItems="center">
<Text size="3xl" fontWeight="700" color="$typography">
{formatNumberToLocale(`${currentCount}`)}
</Text>
<Text size="sm" color="$typographySecondary">
/ {formatNumberToLocale(`${totalCount}`)}
</Text>
</VStack>
</Pressable>

<Pressable
onPress={handleIncrement}
disabled={completed}
width={56}
height={56}
borderRadius={999}
backgroundColor={completed ? "$success" : "$primary"}
alignItems="center"
justifyContent="center"
opacity={completed ? 0.5 : 1}
accessibilityRole="button"
accessibilityLabel="Increase count">
<Icon as={Plus} size="lg" color="$typographyContrast" />
</Pressable>
</HStack>
</Box>
</VStack>
</ActionsheetScrollView>
</ActionsheetContent>
</Actionsheet>
);
};

export default AthkarDetailSheet;
Loading
Loading