Skip to content

Commit

Permalink
Kill presence stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxfish committed Mar 9, 2013
1 parent ec5558d commit 7505bac
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 24 deletions.
2 changes: 1 addition & 1 deletion config/deployed/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
COMPRESS_ENABLED = True

# Pusher
PUSHER_CHANNEL = 'presence-active-calls'
PUSHER_CHANNEL = 'active-calls'

2 changes: 1 addition & 1 deletion config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
PUSHER_APP_ID = '11732'
PUSHER_KEY = 'd20fddb74c58823cd05d'
PUSHER_SECRET = None # must be in local_settings.py
PUSHER_CHANNEL = 'presence-active-calls-test'
PUSHER_CHANNEL = 'active-calls-test'

# Mapquest
MAPQUEST_API_KEY = None # must be in local_settings.py
Expand Down
20 changes: 0 additions & 20 deletions sirens/static/js/views/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Sirens.views.Index = Backbone.View.extend({

pusher: null,
channel: null,
member_count: 0,

initialize: function() {
_.bindAll(this, "render", "show_popover", "pan_to", "add_marker", "update_marker");
Expand Down Expand Up @@ -64,21 +63,6 @@ Sirens.views.Index = Backbone.View.extend({
this.pusher = new Pusher(Sirens.settings.PUSHER_KEY);
this.channel = this.pusher.subscribe(Sirens.settings.PUSHER_CHANNEL);

this.channel.bind("pusher:subscription_succeeded", _.bind(function(members) {
this.member_count = members.count;
this.update_member_count();
}, this));

this.channel.bind("pusher:member_added", _.bind(function(member) {
this.member_count += 1;
this.update_member_count();
}, this));

this.channel.bind("pusher:member_removed", _.bind(function(member) {
this.member_count -= 1;
this.update_member_count();
}, this));

this.channel.bind("new_active_call", _.bind(function(data) {
active_call = new Sirens.models.ActiveCall(data);
this.active_calls.add(active_call);
Expand Down Expand Up @@ -201,10 +185,6 @@ Sirens.views.Index = Backbone.View.extend({
this.add_marker(active_call);
},

update_member_count: function() {
$("#member-count").text(this.member_count);
},

refresh_active_calls_list: function() {
$("#active-calls-list").empty();

Expand Down
2 changes: 0 additions & 2 deletions sirens/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ <h3><a data-controls-modal="welcome-modal" data-keyboard="true" data-backdrop="t
<li><a href="#">You are receiving new reports as they happen!</a></li>
</ul>
<ul class="nav secondary-nav">

<!--<li><a href="#">Current users: <span id="member-count" class="count label success">0</span></a></li>-->
<li class="dropdown">
<a href="#" class="dropdown-toggle">Find a neighborhood or school</a>
<ul class="dropdown-menu">
Expand Down

0 comments on commit 7505bac

Please sign in to comment.