mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 19:15:58 +01:00 
			
		
		
		
	closes #1353
mark all read will mark everything read, can also select topics and mark them read, can mark specific categories read too
This commit is contained in:
		| @@ -71,7 +71,8 @@ module.exports = function(Topics) { | ||||
|  | ||||
| 		var unreadTopics = { | ||||
| 			no_topics_message: '', | ||||
| 			show_markallread_button: 'hidden', | ||||
| 			show_markread_button: 'hidden', | ||||
| 			showSelect: true, | ||||
| 			nextStart : 0, | ||||
| 			topics: [] | ||||
| 		}; | ||||
| @@ -94,7 +95,7 @@ module.exports = function(Topics) { | ||||
| 					unreadTopics.topics = topicData; | ||||
| 					unreadTopics.nextStart = parseInt(rank, 10) + 1; | ||||
| 					unreadTopics.no_topics_message = (!topicData || topicData.length === 0) ? '' : 'hidden'; | ||||
| 					unreadTopics.show_markallread_button = topicData.length === 0 ? 'hidden' : ''; | ||||
| 					unreadTopics.show_markread_button = topicData.length === 0 ? 'hidden' : ''; | ||||
|  | ||||
| 					callback(null, unreadTopics); | ||||
| 				}); | ||||
| @@ -152,7 +153,7 @@ module.exports = function(Topics) { | ||||
| 		}); | ||||
| 	}; | ||||
|  | ||||
| 	Topics.markAllRead = function(uid, tids, callback) { | ||||
| 	Topics.markTidsRead = function(uid, tids, callback) { | ||||
| 		if(!tids || !tids.length) { | ||||
| 			return callback(); | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user