Migrate accountLogoutClicked protobus (#3652)

* migrate accountLogoutClicked

* changeset

---------

Co-authored-by: Elephant Lumps <celestial_vault@Elephants-MacBook-Pro.local>
This commit is contained in:
EvanandElephant Lumps authored and GitHub committed 2025-05-20 10:11:23 +05:30
1 parent 5efbf77f7c
commit c47503affe
10 files changed
+42 -47

No files matched your search

@@ -0,0 +1,14 @@
import type { Empty } from "../../../shared/proto/common"
import type { EmptyRequest } from "../../../shared/proto/common"
import type { Controller } from "../index"
/**
* Handles the account logout action
* @param controller The controller instance
* @param _request The empty request object
* @returns Empty response
*/
export async function accountLogoutClicked(controller: Controller, _request: EmptyRequest): Promise<Empty> {
await controller.handleSignOut()
return {}
}
+2
View File
@@ -4,9 +4,11 @@
// Import all method implementations
import { registerMethod } from "./index"
import { accountLoginClicked } from "./accountLoginClicked"
import { accountLogoutClicked } from "./accountLogoutClicked"
// Register all account service methods
export function registerAllMethods(): void {
// Register each method with the registry
registerMethod("accountLoginClicked", accountLoginClicked)
registerMethod("accountLogoutClicked", accountLogoutClicked)
}
-4
View File
@@ -341,10 +341,6 @@ export class Controller {
case "openMention":
openMention(message.text)
break
case "accountLogoutClicked": {
await this.handleSignOut()
break
}
case "showAccountViewClicked": {
await this.postMessageToWebview({ type: "action", action: "accountButtonClicked" })
break