Skip to content

Commit

Permalink
Save anchor after device added (#1246)
Browse files Browse the repository at this point in the history
This ensures that the anchor is saved (and then displayed on the landing
page) when a local device is added.
  • Loading branch information
nmattia authored Feb 17, 2023
1 parent c22e236 commit 075111b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/frontend/src/flows/addDevice/manage/addLocalDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { pickDeviceAlias } from "./addDevicePickAlias";
import { withLoader } from "../../../components/loader";
import { renderManage } from "../../manage";
import { displayError } from "../../../components/displayError";
import { setAnchorUsed } from "../../../utils/userNumber";

const displayFailedToAddDevice = (error: Error) =>
displayError({
Expand Down Expand Up @@ -63,6 +64,8 @@ export const addLocalDevice = async (
error instanceof Error ? error : unknownError()
);
}

setAnchorUsed(userNumber);
await renderManage(userNumber, connection);
};

Expand Down

0 comments on commit 075111b

Please sign in to comment.