diff options
author | Alex Auvolat <alex@adnab.me> | 2018-10-12 18:16:46 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-10-12 18:16:46 +0200 |
commit | 574b572fac144135c4381581351445bf5d0de81c (patch) | |
tree | 1ad2fa0157583a955069332e6a957250ff362967 /shardweb/lib/views | |
parent | 7bc609a85b43ed86eccb9cd40d9db31f15aaba1d (diff) | |
download | shard-0.0.3.tar.gz shard-0.0.3.zip |
Clean up interface to shards0.0.3
Diffstat (limited to 'shardweb/lib/views')
-rw-r--r-- | shardweb/lib/views/layout_view.ex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shardweb/lib/views/layout_view.ex b/shardweb/lib/views/layout_view.ex index 990df55..d554804 100644 --- a/shardweb/lib/views/layout_view.ex +++ b/shardweb/lib/views/layout_view.ex @@ -26,7 +26,7 @@ defmodule ShardWeb.LayoutView do end def chat_shard_last_msg(pid) do - [{{_, msgbin, _}, true}] = GenServer.call(pid, {:read_history, nil, 1}) + [{{_, msgbin, _}, true}] = SApp.Chat.read_history(pid, nil, 1) {_, msg} = SData.term_unbin msgbin msg end @@ -34,14 +34,14 @@ defmodule ShardWeb.LayoutView do def privchat_with_unread(conn) do for {id, %SApp.Chat.PrivChat.Manifest{pk_list: pk_list}, pid} <- shard_list(), conn.assigns.pk in pk_list, - unread_time = GenServer.call(pid, :has_unread), + unread_time = SApp.Chat.has_unread?(pid), unread_time != nil, do: {id, %SApp.Chat.PrivChat.Manifest{pk_list: pk_list}, pid} end - def chat_with_unread(conn) do + def chat_with_unread(_conn) do for {id, %SApp.Chat.Manifest{channel: c}, pid} <- shard_list(), - unread_time = GenServer.call(pid, :has_unread), + unread_time = SApp.Chat.has_unread?(pid), unread_time != nil, do: {id, %SApp.Chat.Manifest{channel: c}, pid} end |