{"action":"created","issue":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/4125","repository_url":"https://api.github.com/repos/RocketChat/Rocket.Chat","labels_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/4125/labels{/name}","comments_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/4125/comments","events_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/4125/events","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/4125","id":173549148,"number":4125,"title":"Make it easier to mark rooms as read","user":{"login":"JackDragon","id":1388117,"avatar_url":"https://avatars.githubusercontent.com/u/1388117?v=3","gravatar_id":"","url":"https://api.github.com/users/JackDragon","html_url":"https://github.com/JackDragon","followers_url":"https://api.github.com/users/JackDragon/followers","following_url":"https://api.github.com/users/JackDragon/following{/other_user}","gists_url":"https://api.github.com/users/JackDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/JackDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JackDragon/subscriptions","organizations_url":"https://api.github.com/users/JackDragon/orgs","repos_url":"https://api.github.com/users/JackDragon/repos","events_url":"https://api.github.com/users/JackDragon/events{/privacy}","received_events_url":"https://api.github.com/users/JackDragon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/feat:%20channel%20settings","name":"feat: channel settings","color":"207de5"},{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/subj:%20ui/ux","name":"subj: ui/ux","color":"5319e7"},{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/labels/type:%20improvement","name":"type: improvement","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-26T21:41:03Z","updated_at":"2016-09-19T23:56:11Z","closed_at":null,"body":"Your Rocket.Chat : 0.37.1\r\n\r\nIt would be great if there was some easier way to mark rooms as read. Right now, you have to click a room and wait enough time in it. Sometimes, this doesn't even work: if you stay in the room, it still does not clear itself as read, and you have to scroll up through the room or click on the \"Mark all messages as read\" link that shows up sometimes.\r\n\r\nInstead of having these slow and inconsistent ways of having the room being marked as read, it would be nice to just have a simple icon next to the room when you hover over it that marks the room as read when you click on it. It can be left of the \"Hide room\" or \"Leave room\" buttons, or somewhere else on the left or something.\r\n\r\nIf being next to the hide/leave rooms is too cluttered, I would actually rather have those be moved somewhere else, maybe not next to the room names. I mean, you should rarely hide a room and even rarer leave it, so those don't have to show up whenever you hover over a room every time. It would be more useful to change those to be \"Mark as read\" and \"Mark as unread\" instead.\r\n\r\n\r\n![image](https://cloud.githubusercontent.com/assets/1388117/18021114/1474361c-6b9a-11e6-96e3-487f5c1d5466.png)\r\n"},"comment":{"url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/comments/248163457","html_url":"https://github.com/RocketChat/Rocket.Chat/issues/4125#issuecomment-248163457","issue_url":"https://api.github.com/repos/RocketChat/Rocket.Chat/issues/4125","id":248163457,"user":{"login":"nokobon","id":828413,"avatar_url":"https://avatars.githubusercontent.com/u/828413?v=3","gravatar_id":"","url":"https://api.github.com/users/nokobon","html_url":"https://github.com/nokobon","followers_url":"https://api.github.com/users/nokobon/followers","following_url":"https://api.github.com/users/nokobon/following{/other_user}","gists_url":"https://api.github.com/users/nokobon/gists{/gist_id}","starred_url":"https://api.github.com/users/nokobon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nokobon/subscriptions","organizations_url":"https://api.github.com/users/nokobon/orgs","repos_url":"https://api.github.com/users/nokobon/repos","events_url":"https://api.github.com/users/nokobon/events{/privacy}","received_events_url":"https://api.github.com/users/nokobon/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T23:56:11Z","updated_at":"2016-09-19T23:56:11Z","body":"I've come up with a solution/workaround that adds a mark as read button to the tab bar.\r\n\r\nIt works on the Cordova app if you can figure out how to make the client to fetch the custom scripts. I'm not sure what I did, but I eventually managed to get my phone to show the button.\r\n\r\nAdd this to Administration > Layout > Custom Scripts > Custom Script for logged in users:\r\n```javascript\r\nRocketChat.TabBar.addButton({\r\n\tgroups: ['channel', 'privategroup', 'directmessage'],\r\n\tid: 'mark-as-read',\r\n\ti18nTitle: 'Mark as Read',\r\n\ticon: 'icon-book',\r\n\topenClick: function() {\r\n\t\treadMessage.readNow(true);\r\n\t\treturn false;\r\n\t},\r\n\torder: 999\r\n});\r\n```\r\n\r\nChange `order` as desired to move it between specific buttons.\r\n\r\nYou'll have to refresh after adding the script.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/828413/18652640/a55f5384-7e99-11e6-8ac3-dcabe3463265.png)\r\n\r\n---\r\n\r\nA clunkier solution that shows up quicker is to add it to the footer.\r\n\r\nAdministration > Layout > Content > Side Navigation Footer:\r\n```HTML\r\n<a style=\"cursor:pointer\" onClick=\"readMessage.readNow(true);\">Mark as Read</a>\r\n```\r\n\r\nRight now I'm using both solutions with some jquery added as another part of custom scripting to remove the text from the footer."}}
{"actor":{"display_login":"nokobon"}}