Change localUser path
This commit is contained in:
parent
f3cc7f3f99
commit
2ab3d7d657
|
@ -34,7 +34,7 @@ class ManageAccountPage extends HookWidget {
|
|||
final site = await LemmyApiV3(instanceHost).run(GetSite(
|
||||
auth: accountStore.userDataFor(instanceHost, username)!.jwt.raw));
|
||||
|
||||
return site.myUser!;
|
||||
return site.myUser!.localUserView;
|
||||
});
|
||||
|
||||
void _openMoreMenu() {
|
||||
|
|
|
@ -191,12 +191,13 @@ class AccountsStore extends ChangeNotifier {
|
|||
usernameOrEmail: usernameOrEmail,
|
||||
password: password,
|
||||
));
|
||||
final userData =
|
||||
await lemmy.run(GetSite(auth: jwt.raw)).then((value) => value.myUser!);
|
||||
final userData = await lemmy
|
||||
.run(GetSite(auth: jwt.raw))
|
||||
.then((value) => value.myUser!.localUserView.person);
|
||||
|
||||
accounts[instanceHost]![userData.person.name] = UserData(
|
||||
accounts[instanceHost]![userData.name] = UserData(
|
||||
jwt: jwt,
|
||||
userId: userData.person.id,
|
||||
userId: userData.id,
|
||||
);
|
||||
|
||||
await _assignDefaultAccounts();
|
||||
|
|
|
@ -119,7 +119,7 @@ class ConfigStore extends ChangeNotifier {
|
|||
Future<void> importLemmyUserSettings(Jwt token) async {
|
||||
final site =
|
||||
await LemmyApiV3(token.payload.iss).run(GetSite(auth: token.raw));
|
||||
copyLemmyUserSettings(site.myUser!.localUser);
|
||||
copyLemmyUserSettings(site.myUser!.localUserView.localUser);
|
||||
}
|
||||
|
||||
static Future<ConfigStore> load() async {
|
||||
|
|
Loading…
Reference in New Issue