Skip to content

Commit

Permalink
Add ability to re-order accounts (#1494)
Browse files Browse the repository at this point in the history
* Ability to re-order accounts

* Fix db tests

* Fix missing field from db update
  • Loading branch information
micahmo authored Jul 21, 2024
1 parent 09a404f commit 90c0175
Show file tree
Hide file tree
Showing 3 changed files with 467 additions and 317 deletions.
8 changes: 7 additions & 1 deletion lib/account/models/account.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Account {
username: username,
jwt: jwt,
instance: instance,
anonymous: anonymous,
userId: userId,
index: index ?? this.index,
);
Expand All @@ -53,6 +54,7 @@ class Account {
username: Value(account.username),
jwt: Value(account.jwt),
instance: Value(account.instance),
anonymous: Value(account.anonymous),
userId: Value(account.userId),
listIndex: newIndex,
),
Expand Down Expand Up @@ -81,8 +83,8 @@ class Account {
username: Value(anonymousInstance.username),
jwt: Value(anonymousInstance.jwt),
instance: Value(anonymousInstance.instance),
userId: Value(anonymousInstance.userId),
anonymous: Value(anonymousInstance.anonymous),
userId: Value(anonymousInstance.userId),
listIndex: newIndex,
),
);
Expand All @@ -103,6 +105,7 @@ class Account {
username: account.username,
jwt: account.jwt,
instance: account.instance ?? '',
anonymous: account.anonymous,
userId: account.userId,
index: account.listIndex,
))
Expand All @@ -122,6 +125,7 @@ class Account {
username: account.username,
jwt: account.jwt,
instance: account.instance ?? '',
anonymous: account.anonymous,
userId: account.userId,
index: account.listIndex,
))
Expand All @@ -143,6 +147,7 @@ class Account {
username: account.username,
jwt: account.jwt,
instance: account.instance ?? '',
anonymous: account.anonymous,
userId: account.userId,
index: account.listIndex,
);
Expand All @@ -160,6 +165,7 @@ class Account {
username: Value(account.username),
jwt: Value(account.jwt),
instance: Value(account.instance),
anonymous: Value(account.anonymous),
userId: Value(account.userId),
listIndex: Value(account.index),
));
Expand Down
Loading

0 comments on commit 90c0175

Please sign in to comment.