Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.19.5-otp-28
erlang 28.4.1
elixir 1.20.4-otp-29
erlang 29.1.2
11 changes: 3 additions & 8 deletions lib/live_sync.ex
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,8 @@ defmodule LiveSync do
quote do
on_mount({LiveSync, unquote(opts)})

def sync(key, value, socket), do: assign(socket, key, value)
def sync(key, value, _operations, socket), do: sync(key, value, socket)

# the fallbacks go last so they catch whatever the LiveView's own clauses don't
@before_compile {LiveSync, :add_sync_fallback}

defoverridable sync: 3, sync: 4
end
end

Expand Down Expand Up @@ -205,7 +201,7 @@ defmodule LiveSync do
end

def opts(module) do
LiveSync.Watch.impl_for(struct(module)).opts()
LiveSync.Watch.impl_for!(struct(module)).opts()
end

@doc """
Expand All @@ -228,7 +224,6 @@ defmodule LiveSync do
2
"""
def subscription_key(struct) do
impl = LiveSync.Watch.impl_for(struct)
impl.subscription_key(struct)
LiveSync.Watch.impl_for!(struct).subscription_key(struct)
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule LiveSync.MixProject do
def project do
[
app: :live_sync,
version: "0.1.12",
version: "0.1.13",
elixir: "~> 1.17",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
Expand Down
Loading