refac: use update/3 to change handle_topic?
Untracked files:
This commit is contained in:
parent
b05b844b6c
commit
091a60eea4
@ -30,6 +30,6 @@ defmodule SlaxWeb.ChatRoomLive do
|
||||
end
|
||||
|
||||
def handle_event("toggle-topic", _params, socket) do
|
||||
{:noreply, assign(socket, hide_topic?: !socket.assigns.hide_topic?)}
|
||||
{:noreply, update(socket, :hide_topic?, &(!&1))}
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user