Skip to content

Commit 1d84a06

Browse files
committed
small fixes
1 parent 46618aa commit 1d84a06

7 files changed

Lines changed: 49 additions & 12 deletions

File tree

mobile/app.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = ({config}: ConfigContext): Partial<ExpoConfig> => {
2626
// icon: "./assets/app-icons/ic_launcher.png",
2727
package: "com.mentra.mentra",
2828
googleServicesFile: "./google-services.json",
29-
versionCode: 110,
29+
versionCode: 112,
3030
adaptiveIcon: {
3131
foregroundImage: "./assets/app-icons/ic_launcher_foreground.png",
3232
// backgroundImage: "./assets/app-icons/ic_launcher.png",
@@ -59,7 +59,7 @@ module.exports = ({config}: ConfigContext): Partial<ExpoConfig> => {
5959
icon: "./assets/app-icons/ic_launcher.png",
6060
supportsTablet: false,
6161
requireFullScreen: true,
62-
buildNumber: "110",
62+
buildNumber: "112",
6363
bundleIdentifier: "com.mentra.mentra",
6464
googleServicesFile: "./GoogleService-Info.plist",
6565
associatedDomains: ["applinks:apps.mentra.glass"],

mobile/src/app/(tabs)/home.tsx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import {useFocusEffect} from "@react-navigation/native"
22
import {useCallback, useEffect, useRef} from "react"
33
import {Platform, ScrollView, View} from "react-native"
44
import {useSharedValue} from "react-native-reanimated"
5+
import {LinearGradient} from "expo-linear-gradient"
6+
import MaskedView from "@react-native-masked-view/masked-view"
57

68
import {MentraLogoStandalone} from "@/components/brands/MentraLogoStandalone"
79
import {CustomBackground} from "@/components/home/CustomBackground"
@@ -99,7 +101,30 @@ export default function Homepage() {
99101

100102
const renderTopPadding = () => {
101103
if (Platform.OS === "android" && !androidBlur) {
102-
return <View style={{paddingTop: insets.top}} />
104+
return null
105+
}
106+
if (Platform.OS === "android") {
107+
return (
108+
<MaskedView
109+
style={{position: "absolute", left: 0, right: 0, top: 0, height: insets.top * 2, zIndex: 10, pointerEvents: "none"}}
110+
maskElement={
111+
<LinearGradient
112+
colors={["black", "transparent"]}
113+
locations={[0.4, 1]}
114+
start={{x: 0, y: 0}}
115+
end={{x: 0, y: 1}}
116+
style={{position: "absolute", left: 0, right: 0, top: 0, bottom: 0}}
117+
pointerEvents="none"
118+
/>
119+
}>
120+
<BlurView
121+
intensity={20}
122+
className="absolute inset-0"
123+
blurTarget={blurTargetRef}
124+
blurMethod="dimezisBlurViewSdk31Plus"
125+
/>
126+
</MaskedView>
127+
)
103128
}
104129
return (
105130
<BlurView
@@ -149,6 +174,7 @@ export default function Homepage() {
149174
contentContainerStyle={{flexGrow: 1}}
150175
scrollEventThrottle={16}>
151176
{appSwitcherUi && Platform.OS === "android" && androidBlur && <View style={{paddingTop: insets.top}} />}
177+
{appSwitcherUi && Platform.OS === "android" && !androidBlur && <View style={{paddingTop: insets.top}} />}
152178
<View className="h-4" />
153179
{renderContent()}
154180
<View className="h-4" />

mobile/src/app/miniapps/settings/main.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,13 @@ export default function AccountPage() {
5151
)}
5252

5353
<Group title={translate("account:appSettings")}>
54-
<RouteButton
55-
icon={<Icon name="sun" size={24} color={theme.colors.secondary_foreground} />}
56-
label={translate("settings:appAppearance")}
57-
onPress={() => push("/miniapps/settings/appearance")}
58-
/>
54+
{superMode && (
55+
<RouteButton
56+
icon={<Icon name="sun" size={24} color={theme.colors.secondary_foreground} />}
57+
label={translate("settings:appAppearance")}
58+
onPress={() => push("/miniapps/settings/appearance")}
59+
/>
60+
)}
5961
{(Platform.OS === "android" || superMode) && (
6062
<RouteButton
6163
icon={<Icon name="bell" size={24} color={theme.colors.secondary_foreground} />}

mobile/src/components/home/AppSwitcherButtton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export default function AppSwitcherButton({swipeProgress, onGridButtonPress, blu
168168
/>
169169
)}
170170

171-
{Platform.OS === "android" && !androidBlur && <View className="flex-1 h-full bg-background" />}
171+
{Platform.OS === "android" && !androidBlur && <View className="flex-1 h-full" />}
172172

173173
{Platform.OS === "ios" && (
174174
<BlurView intensity={70} className="absolute inset-0" blurMethod="dimezisBlurViewSdk31Plus" />

mobile/src/services/asg/gallerySyncService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,6 +1376,7 @@ class GallerySyncService {
13761376
glassesModel: defaultWearable,
13771377
shouldProcess: !!shouldProcessImages,
13781378
shouldAutoSave: !!shouldAutoSave,
1379+
thumbnailPath: downloadedFile.thumbnailPath,
13791380
deleteFromGlasses: [downloadedFile.name],
13801381
})
13811382
}

mobile/src/services/asg/mediaProcessingQueue.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export interface ProcessingItem {
4040
shouldProcess: boolean
4141
/** Whether to auto-save to camera roll */
4242
shouldAutoSave: boolean
43+
/** Pre-downloaded thumbnail path (v1 legacy sync) */
44+
thumbnailPath?: string
4345
/** File names to delete from glasses after processing completes */
4446
deleteFromGlasses?: string[]
4547
}
@@ -174,8 +176,8 @@ class MediaProcessingQueue {
174176
}
175177
}
176178

177-
// 4. Save thumbnail to disk
178-
let localThumbnailPath: string | undefined
179+
// 4. Save thumbnail to disk (or use pre-downloaded thumbnail from v1 sync)
180+
let localThumbnailPath: string | undefined = item.thumbnailPath
179181
if (item.thumbnailData && item.captureDir) {
180182
try {
181183
const RNFS = require("@dr.pogodin/react-native-fs")

mobile/src/stores/settings.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
import {Platform} from "react-native"
12
import {getTimeZone} from "react-native-localize"
23
import {AsyncResult, result as Res, Result} from "typesafe-ts"
34
import {create} from "zustand"
45
import {subscribeWithSelector} from "zustand/middleware"
6+
import * as Device from "expo-device"
57

68
import restComms from "@/services/RestComms"
79
import {storage} from "@/utils/storage"
@@ -40,7 +42,11 @@ export const SETTINGS: Record<string, Setting> = {
4042
},
4143
android_blur: {
4244
key: "android_blur",
43-
defaultValue: () => true,
45+
defaultValue: () => {
46+
if (Platform.OS !== "android") return true
47+
const ram = Device.totalMemory
48+
return ram ? ram >= 4 * 1024 * 1024 * 1024 : true
49+
},
4450
writable: true,
4551
saveOnServer: true,
4652
persist: true,

0 commit comments

Comments
 (0)