removed recent/day week month

it starts with most recent 20 topics now and goes back instead of
showing empty if there are no new replies in the past 24 hours
This commit is contained in:
barisusakli
2014-10-26 20:26:56 -04:00
parent c4a39c8163
commit c74370bfb1
5 changed files with 31 additions and 35 deletions

View File

@@ -459,14 +459,14 @@ SocketTopics.loadMore = function(socket, data, callback) {
};
SocketTopics.loadMoreRecentTopics = function(socket, data, callback) {
if(!data || !data.term || !data.after) {
if(!data || !data.after) {
return callback(new Error('[[error:invalid-data]]'));
}
var start = parseInt(data.after, 10),
end = start + 9;
topics.getLatestTopics(socket.uid, start, end, data.term, callback);
topics.getRecentTopics(socket.uid, start, end, callback);
};
SocketTopics.loadMoreUnreadTopics = function(socket, data, callback) {