From 97c64cedb8a7be72f3af561e9ad348e0c98fd380 Mon Sep 17 00:00:00 2001 From: Wojtek Mach Date: Sun, 23 Jan 2022 20:46:30 +0100 Subject: [PATCH] Open Livebook homepage on `:reopen_app` event (#928) --- lib/livebook_app.ex | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/livebook_app.ex b/lib/livebook_app.ex index 7485be2e9..c8598e155 100644 --- a/lib/livebook_app.ex +++ b/lib/livebook_app.ex @@ -71,6 +71,12 @@ if Mix.target() == :app do {:noreply, state} end + @impl true + def handle_info({:reopen_app, _}, state) do + Livebook.Utils.browser_open(LivebookWeb.Endpoint.access_url()) + {:noreply, state} + end + # ignore other events @impl true def handle_info(_event, state) do