From 75206e235471c9fc7a35c217efe418eb28746ac8 Mon Sep 17 00:00:00 2001 From: tomdroid Date: Fri, 12 Aug 2022 08:47:21 -0700 Subject: [PATCH 1/2] Attempting to configure Android --- lib/narwin_chat_web/live/chat_live.android.heex | 3 +++ lib/narwin_chat_web/live/chat_live.ex | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 lib/narwin_chat_web/live/chat_live.android.heex diff --git a/lib/narwin_chat_web/live/chat_live.android.heex b/lib/narwin_chat_web/live/chat_live.android.heex new file mode 100644 index 0000000..a937bb5 --- /dev/null +++ b/lib/narwin_chat_web/live/chat_live.android.heex @@ -0,0 +1,3 @@ + + Hello + diff --git a/lib/narwin_chat_web/live/chat_live.ex b/lib/narwin_chat_web/live/chat_live.ex index 3c01c04..698b808 100644 --- a/lib/narwin_chat_web/live/chat_live.ex +++ b/lib/narwin_chat_web/live/chat_live.ex @@ -8,6 +8,9 @@ defmodule NarwinChatWeb.ChatLive do :ios -> render_ios(assigns) + :android -> + render_android(assigns) + :web -> render_web(assigns) end From 6a6fddc0800e193fb45e23db1214a8a13b20fa76 Mon Sep 17 00:00:00 2001 From: tomdroid Date: Fri, 12 Aug 2022 09:22:12 -0700 Subject: [PATCH 2/2] add android to native helpers --- lib/narwin_chat_web/liveview_native_helpers.ex | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/narwin_chat_web/liveview_native_helpers.ex b/lib/narwin_chat_web/liveview_native_helpers.ex index 5234257..c13e068 100644 --- a/lib/narwin_chat_web/liveview_native_helpers.ex +++ b/lib/narwin_chat_web/liveview_native_helpers.ex @@ -13,6 +13,14 @@ defmodule NarwinChatWeb.LiveViewNativeHelpers do engine: Phoenix.LiveView.HTMLEngine ) + EEx.function_from_file( + :defp, + :render_android, + "lib/narwin_chat_web/live/#{unquote(template)}.android.heex", + [:assigns], + engine: Phoenix.LiveView.HTMLEngine + ) + EEx.function_from_file( :defp, :render_ios,