Skip to content

Commit 815d2fa

Browse files
authored
Merge pull request linkwarden#1642 from linkwarden/dev
Dev
2 parents 7fb8ceb + 054a82a commit 815d2fa

8 files changed

Lines changed: 56 additions & 38 deletions

File tree

apps/mobile/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "Linkwarden",
44
"slug": "linkwarden",
5-
"version": "1.2.1",
5+
"version": "1.2.2",
66
"orientation": "portrait",
77
"icon": "./assets/images/icon.png",
88
"scheme": "linkwarden",

apps/mobile/app/(tabs)/collections/_layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ export default function Layout() {
3131
headerIconColor: colorScheme === "dark" ? "white" : "black",
3232
},
3333
headerShadowVisible: false,
34-
headerBlurEffect:
35-
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
34+
headerBlurEffect: isIOS26Plus
35+
? "none"
36+
: colorScheme === "dark"
37+
? "systemMaterialDark"
38+
: "systemMaterial",
3639
headerLargeStyle: {
3740
backgroundColor: isIOS26Plus
3841
? "transparent"

apps/mobile/app/(tabs)/dashboard/_layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ export default function Layout() {
1818
headerLargeTitle: true,
1919
headerTransparent: Platform.OS === "ios",
2020
headerShadowVisible: false,
21-
headerBlurEffect:
22-
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
21+
headerBlurEffect: isIOS26Plus
22+
? "none"
23+
: colorScheme === "dark"
24+
? "systemMaterialDark"
25+
: "systemMaterial",
2326
headerTintColor: colorScheme === "dark" ? "white" : "black",
2427
headerLargeStyle: {
2528
backgroundColor: isIOS26Plus

apps/mobile/app/(tabs)/links/_layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@ export default function Layout() {
3131
headerIconColor: colorScheme === "dark" ? "white" : "black",
3232
},
3333
headerShadowVisible: false,
34-
headerBlurEffect:
35-
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
34+
headerBlurEffect: isIOS26Plus
35+
? "none"
36+
: colorScheme === "dark"
37+
? "systemMaterialDark"
38+
: "systemMaterial",
3639
headerLargeStyle: {
3740
backgroundColor: isIOS26Plus
3841
? "transparent"

apps/mobile/app/(tabs)/settings/_layout.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ export default function Layout() {
1818
headerTintColor: colorScheme === "dark" ? "white" : "black",
1919
headerShadowVisible: false,
2020
headerBackTitle: "Back",
21-
headerBlurEffect:
22-
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
21+
headerBlurEffect: isIOS26Plus
22+
? "none"
23+
: colorScheme === "dark"
24+
? "systemMaterialDark"
25+
: "systemMaterial",
2326
headerLargeStyle: {
2427
backgroundColor: isIOS26Plus
2528
? "transparent"
@@ -47,14 +50,11 @@ export default function Layout() {
4750
headerTitle: "Preferred Collection",
4851
headerLargeTitle: false,
4952
headerTransparent: Platform.OS === "ios",
50-
headerBackground: () => (
51-
<View
52-
style={{
53-
flex: 1,
54-
backgroundColor: themeBackgroundColor,
55-
}}
56-
/>
57-
),
53+
headerBlurEffect: isIOS26Plus
54+
? "none"
55+
: colorScheme === "dark"
56+
? "systemMaterialDark"
57+
: "systemMaterial",
5858
headerSearchBarOptions: {
5959
placeholder: "Search Collections",
6060
autoCapitalize: "none",

apps/mobile/app/(tabs)/settings/preferredCollection.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { Folder, Check } from "lucide-react-native";
88
import { useColorScheme } from "nativewind";
99
import { rawTheme, ThemeName } from "@/lib/colors";
1010
import { useLocalSearchParams } from "expo-router";
11-
import { useHeaderHeight } from "@react-navigation/elements";
12-
import { useSafeAreaInsets } from "react-native-safe-area-context";
1311

1412
const PreferredCollectionScreen = () => {
1513
const { auth } = useAuthStore();
@@ -20,8 +18,6 @@ const PreferredCollectionScreen = () => {
2018
const [filteredCollections, setFilteredCollections] = useState<
2119
CollectionIncludingMembersAndLinkCount[]
2220
>([]);
23-
const headerHeight = useHeaderHeight();
24-
const insets = useSafeAreaInsets();
2521

2622
useEffect(() => {
2723
const filter =
@@ -80,11 +76,10 @@ const PreferredCollectionScreen = () => {
8076
data={filteredCollections}
8177
keyExtractor={(item) => item.id?.toString() || ""}
8278
renderItem={renderCollection}
79+
contentInsetAdjustmentBehavior="automatic"
8380
contentContainerStyle={{
8481
paddingHorizontal: 16,
85-
flexGrow: 1,
86-
paddingTop: Platform.OS === "ios" ? headerHeight + 10 : 10,
87-
paddingBottom: insets.bottom + 60,
82+
paddingTop: 10,
8883
}}
8984
ListEmptyComponent={
9085
<View

apps/mobile/app/(tabs)/tags/_layout.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ export default function Layout() {
3030
headerIconColor: colorScheme === "dark" ? "white" : "black",
3131
},
3232
headerShadowVisible: false,
33-
headerBlurEffect:
34-
colorScheme === "dark" ? "systemMaterialDark" : "systemMaterial",
33+
headerBlurEffect: isIOS26Plus
34+
? "none"
35+
: colorScheme === "dark"
36+
? "systemMaterialDark"
37+
: "systemMaterial",
3538
headerLargeStyle: {
3639
backgroundColor: isIOS26Plus
3740
? "transparent"

apps/web/lib/api/controllers/tags/getTags.ts

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,39 @@ export default async function getTags({
2525
orderBy = [{ links: { _count: "asc" } }, { id: "asc" }];
2626

2727
if (userId) {
28+
const memberCollections = await prisma.usersAndCollections.findMany({
29+
where: {
30+
userId,
31+
},
32+
select: {
33+
collectionId: true,
34+
},
35+
});
36+
37+
const memberCollectionIds = memberCollections.map(
38+
(memberCollection) => memberCollection.collectionId
39+
);
40+
2841
const tags = await prisma.tag.findMany({
2942
take: paginationTakeCount,
3043
skip: query.cursor ? 1 : undefined,
3144
cursor: query.cursor ? { id: query.cursor } : undefined,
3245
where: {
3346
OR: [
3447
{ ownerId: userId }, // Tags owned by the user
35-
{
36-
links: {
37-
some: {
38-
collection: {
39-
members: {
48+
...(memberCollectionIds.length > 0
49+
? [
50+
{
51+
links: {
4052
some: {
41-
userId, // Tags from collections where the user is a member
53+
collectionId: {
54+
in: memberCollectionIds,
55+
},
4256
},
4357
},
4458
},
45-
},
46-
},
47-
},
59+
]
60+
: []),
4861
],
4962
},
5063
include: {
@@ -70,9 +83,7 @@ export default async function getTags({
7083
where: {
7184
links: {
7285
some: {
73-
collection: {
74-
id: collectionId,
75-
},
86+
collectionId,
7687
},
7788
},
7889
},

0 commit comments

Comments
 (0)