Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
6dc7b83
fix: add explicit relationship field selection for Appwrite v1.8.0
pranjal29092005 Dec 13, 2025
3889a6c
fix: correct Appwrite v1.8.0 relationship field loading
pranjal29092005 Dec 19, 2025
7447130
chore: resolve merge conflicts with dev branch
pranjal29092005 Dec 19, 2025
a10f206
test: fix test mocks for new tables API with Query.select
pranjal29092005 Dec 19, 2025
7a05c17
test: fix friends_controller_test with anyNamed for queries parameter
pranjal29092005 Dec 19, 2025
ff3c466
Remove merge_dev.bat as it is not part of the PR scope
pranjal29092005 Jan 3, 2026
4319573
fix: add Query.select(["*"]) to all relationship queries for Appwrite…
pranjal29092005 Jan 3, 2026
e616eef
fix: add Query.select(["*"]) to all relationship queries and update t…
pranjal29092005 Jan 3, 2026
865124f
fix: remove all incorrect Query.select(["*"]) - only use specific rel…
pranjal29092005 Jan 3, 2026
c9ba19e
fix: add missing userReports.* relationship attribute to Query.select…
pranjal29092005 Jan 4, 2026
8fd19e5
fix: add missing userReports.* relationship attribute to Query.select…
pranjal29092005 Jan 4, 2026
a5d8d95
fix: add liveChapterAttendees.users.* relationship attribute for Appw…
pranjal29092005 Jan 4, 2026
f6ca755
chore: remove pubspec.lock from version control
pranjal29092005 Jan 4, 2026
7810c1f
chore: add pubspec.lock to .gitignore
pranjal29092005 Jan 4, 2026
5fd32b8
chore: remove unnecessary test stubs unrelated to relationship loading
pranjal29092005 Jan 4, 2026
6b94057
chore: restore pubspec.lock and .gitignore to match main branch
pranjal29092005 Jan 4, 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
1 change: 1 addition & 0 deletions lib/controllers/auth_state_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ class AuthStateController extends GetxController {
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: appwriteUser.$id,
queries: [Query.select(["*", "followers.*", "userReports.*"])],
);
profileImageUrl = userDataDoc.data["profileImageUrl"];
profileImageID = userDataDoc.data["profileImageID"];
Expand Down
4 changes: 3 additions & 1 deletion lib/controllers/change_email_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class ChangeEmailController extends GetxController {
final docs = await tables.listRows(
databaseId: userDatabaseID,
tableId: usernameTableID,
queries: [Query.equal('email', changedEmail)],
queries: [
Query.equal('email', changedEmail),
],
);

if (docs.total > 0) {
Expand Down
1 change: 1 addition & 0 deletions lib/controllers/explore_story_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ class ExploreStoryController extends GetxController {
databaseId: userDatabaseID,
tableId: liveChapterAttendeesTableId,
rowId: liveStoryDocuments.first.$id,
queries: [Query.select(["*", "users.*"])],
);

final attendeesModel = LiveChapterAttendeesModel.fromJson(
Expand Down
1 change: 1 addition & 0 deletions lib/controllers/friends_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class FriendsController extends GetxController {
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: authStateController.uid!,
queries: [Query.select(["*", "friends.*"])],
);
for (var friend in (userDoc.data["friends"] ?? []) as List<dynamic>) {
final friendModel = FriendsModel.fromJson(friend);
Expand Down
1 change: 1 addition & 0 deletions lib/controllers/user_profile_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ class UserProfileController extends GetxController {
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: userId,
queries: [Query.select(["*", "followers.*"])],
);

searchedUserFollowers.value =
Expand Down
1 change: 1 addition & 0 deletions test/controllers/auth_state_controller_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ void main() {
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: '123',
queries: [Query.select(["*", "followers.*", "userReports.*"])],
),
).thenAnswer((_) => Future.value(mockUserDocument));
when(
Expand Down
5 changes: 4 additions & 1 deletion test/controllers/change_email_controller_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ void main() {
mockTablesDB.listRows(
databaseId: userDatabaseID,
tableId: usernameTableID,
queries: [Query.equal('email', '[email protected]')],
queries: [
Query.equal('email', '[email protected]'),
],
),
).thenAnswer((_) => Future.value(RowList(total: 0, rows: [])));
when(mockAccount.get()).thenAnswer((_) => Future.value(mockUser));
Expand All @@ -90,6 +92,7 @@ void main() {
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: '123',
queries: [Query.select(["*", "followers.*", "userReports.*"])],
),
).thenAnswer((_) => Future.value(mockUserDocument.rows.first));
when(
Expand Down
6 changes: 6 additions & 0 deletions test/controllers/friends_controller_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,18 @@ void main() {
);

friendsController.authStateController.uid = 'id2';
friendsController.authStateController.userName = 'testu2';
friendsController.authStateController.profileImageUrl = 'https://example.com/profile2.jpg';
friendsController.authStateController.displayName = 'Test User 2';
friendsController.authStateController.ratingTotal = 25.0;
friendsController.authStateController.ratingCount = 5;

when(
tables.getRow(
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: 'id2',
queries: [Query.select(["*", "friends.*"])],
),
).thenAnswer(
(_) => Future.delayed(Duration(seconds: 2), () => mockUserRow),
Expand Down
6 changes: 6 additions & 0 deletions test/controllers/user_profile_controller_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ void main() {
);

userProfileController.authStateController.uid = 'id2';
userProfileController.authStateController.userName = 'testu2';
userProfileController.authStateController.profileImageUrl = 'https://example.com/profile2.jpg';
userProfileController.authStateController.displayName = 'Test User 2';
userProfileController.authStateController.ratingTotal = 25.0;
userProfileController.authStateController.ratingCount = 5;

when(
tablesDB.listRows(
Expand Down Expand Up @@ -254,6 +259,7 @@ void main() {
databaseId: userDatabaseID,
tableId: usersTableID,
rowId: 'id1',
queries: [Query.select(["*", "followers.*"])],
),
).thenAnswer(
(_) =>
Expand Down