Permalink
Browse files

fix user channel removal

  • Loading branch information...
octatone committed Apr 19, 2012
1 parent 2c41a2f commit 3a13b895706352f084137fa18986c721d9027ccd
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/tv.js
View
@@ -803,13 +803,14 @@ function addChannel(subreddit){
function removeChan(chan){ //by index (integer)
var idx = getUserChan(Globals.channels[chan].channel);
if(idx){
- if(chan === Globals.cur_chan){
+ if(parseInt(chan) === parseInt(Globals.cur_chan)){
chgChan('up');
}
$('#channel-'+chan).remove();
Globals.user_channels.splice(idx, 1);
- $.jStorage('user_channels', Globals.user_channels);
+ $.jStorage.set('user_channels', Globals.user_channels);
+
//free some memory bitches
Globals.channels[chan] = {channel: '', feed: ''};
Globals.videos[chan] = undefined;

0 comments on commit 3a13b89

Please sign in to comment.