Commit 53bdebf6 by Ibrahim Awwal

Prevent threads from being added to a discussion twice.

Probably slow, but it works for now.
parent ab5f7b40
...@@ -18,7 +18,8 @@ if Backbone? ...@@ -18,7 +18,8 @@ if Backbone?
@current_page < @pages @current_page < @pages
addThread: (thread, options) -> addThread: (thread, options) ->
# TODO: Check for existing thread with same ID? # TODO: Check for existing thread with same ID in a faster way
if not @find(thread.id)
options ||= {} options ||= {}
model = new Thread thread model = new Thread thread
@add model @add model
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment