This commit is contained in:
Mirco Wittrien 2020-09-12 18:11:58 +02:00
parent 5040096bd8
commit d41fa45132
4 changed files with 6 additions and 4 deletions

View File

@ -2224,6 +2224,7 @@ module.exports = (_ => {
BDFDB.MessageUtils.rerenderAll = function (instant) {
BDFDB.TimeUtils.clear(MessageRerenderTimeout);
MessageRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
BDFDB.ChannelUtils.markAsRead(BDFDB.LibraryModules.LastChannelStore.getChannelId());
let LayerProviderIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.messageswrapper), {name:"LayerProvider", unlimited:true, up:true});
let LayerProviderPrototype = BDFDB.ObjectUtils.get(LayerProviderIns, "_reactInternalFiber.type.prototype");
if (LayerProviderIns && LayerProviderPrototype) {

View File

@ -2374,6 +2374,7 @@
BDFDB.MessageUtils.rerenderAll = function (instant) {
BDFDB.TimeUtils.clear(MessageRerenderTimeout);
MessageRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
BDFDB.ChannelUtils.markAsRead(BDFDB.LibraryModules.LastChannelStore.getChannelId());
let LayerProviderIns = BDFDB.ReactUtils.findOwner(document.querySelector(BDFDB.dotCN.messageswrapper), {name:"LayerProvider", unlimited:true, up:true});
let LayerProviderPrototype = BDFDB.ReactUtils.getValue(LayerProviderIns, "_reactInternalFiber.type.prototype");
if (LayerProviderIns && LayerProviderPrototype) {

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@ var MessageUtilities = (_ => {
return class MessageUtilities {
getName () {return "MessageUtilities";}
getVersion () {return "1.7.6";}
getVersion () {return "1.7.7";}
getAuthor () {return "DevilBro";}
@ -16,7 +16,7 @@ var MessageUtilities = (_ => {
constructor () {
this.changelog = {
"improved":[["Search Results","Now works in search results"]]
"fixed":[["Mark as Unread","No longer shows key combo hint even if setting is disabled"]]
};
this.patchedModules = {
@ -206,7 +206,7 @@ var MessageUtilities = (_ => {
if (group && group.type == BDFDB.LibraryComponents.MenuItems.MenuGroup && BDFDB.ArrayUtils.is(group.props.children)) for (let item of group.props.children) {
if (item && item.props && item.props.id && !item.props.hint && !item.props.children) {
let hint, action;
if (item.props.id == "mark-unread") hint = `${BDFDB.LibraryModules.KeyCodeUtils.getString(18)}+${clickMap[0]}`;
if (item.props.id == "mark-unread") hint = settings.addHints && `${BDFDB.LibraryModules.KeyCodeUtils.getString(18)}+${clickMap[0]}`;
else {
switch (item.props.id) {
case "copy-link":