stuf
This commit is contained in:
parent
3fcc92d1e4
commit
74ca507097
|
@ -2227,7 +2227,11 @@ module.exports = (_ => {
|
|||
BDFDB.MessageUtils.rerenderAll = function (instant) {
|
||||
BDFDB.TimeUtils.clear(MessageRerenderTimeout);
|
||||
MessageRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
|
||||
BDFDB.ChannelUtils.markAsRead(BDFDB.LibraryModules.LastChannelStore.getChannelId());
|
||||
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(BDFDB.LibraryModules.LastChannelStore.getChannelId());
|
||||
if (channel) {
|
||||
if (BDFDB.DMUtils.isDMChannel(channel)) BDFDB.DMUtils.markAsRead(channel);
|
||||
else BDFDB.ChannelUtils.markAsRead(channel);
|
||||
}
|
||||
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) {
|
||||
|
@ -5312,6 +5316,8 @@ module.exports = (_ => {
|
|||
}
|
||||
};
|
||||
|
||||
InternalComponents.LibraryComponents.GuildComponents = Object.assign({}, InternalComponents.LibraryComponents.GuildComponents);
|
||||
|
||||
InternalComponents.LibraryComponents.GuildComponents.Guild = reactInitialized && class BDFDB_Guild extends LibraryModules.React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -5656,7 +5662,7 @@ module.exports = (_ => {
|
|||
|
||||
InternalComponents.LibraryComponents.ModalComponents.ModalContent = reactInitialized && class BDFDB_ModalContent extends LibraryModules.React.Component {
|
||||
render() {
|
||||
return this.props.scroller ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.ScrollerThin, {
|
||||
return this.props.scroller ? BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Scrollers.Thin, {
|
||||
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.modalcontent, this.props.className),
|
||||
ref: this.props.scrollerRef,
|
||||
children: this.props.children
|
||||
|
@ -5672,7 +5678,7 @@ module.exports = (_ => {
|
|||
|
||||
InternalComponents.LibraryComponents.ModalComponents.ModalTabContent = reactInitialized && class BDFDB_ModalTabContent extends LibraryModules.React.Component {
|
||||
render() {
|
||||
return BDFDB.ReactUtils.forceStyle(BDFDB.ReactUtils.createElement(this.props.scroller ? InternalComponents.LibraryComponents.ScrollerThin : "div", Object.assign(BDFDB.ObjectUtils.exclude(this.props, "scroller", "open", "render"), {
|
||||
return BDFDB.ReactUtils.forceStyle(BDFDB.ReactUtils.createElement(this.props.scroller ? InternalComponents.LibraryComponents.Scrollers.Thin : "div", Object.assign(BDFDB.ObjectUtils.exclude(this.props, "scroller", "open", "render"), {
|
||||
className: BDFDB.DOMUtils.formatClassName(BDFDB.disCN.modaltabcontent, this.props.open && BDFDB.disCN.modaltabcontentopen, this.props.className),
|
||||
style: Object.assign({}, this.props.style, {
|
||||
display: this.props.open ? null : "none"
|
||||
|
@ -5803,7 +5809,7 @@ module.exports = (_ => {
|
|||
items = items.flat(10);
|
||||
}
|
||||
}
|
||||
return typeof this.props.renderItem != "function" || !items.length ? null : BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.ScrollerThin, {
|
||||
return typeof this.props.renderItem != "function" || !items.length ? null : BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Scrollers.Thin, {
|
||||
className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.paginationlist, this.props.mini, BDFDB.disCN.paginationlistmini),
|
||||
fade: this.props.fade,
|
||||
children: [
|
||||
|
@ -6353,7 +6359,7 @@ module.exports = (_ => {
|
|||
return BDFDB.ReactUtils.createElement("div", {
|
||||
className: BDFDB.DOMUtils.formatClassName(this.props.className, BDFDB.disCN.sidebarlist),
|
||||
children: [
|
||||
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.ScrollerThin, {
|
||||
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Scrollers.Thin, {
|
||||
className: BDFDB.DOMUtils.formatClassName(this.props.sidebarClassName, BDFDB.disCN.sidebar),
|
||||
fade: true,
|
||||
children: BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.TabBar, {
|
||||
|
@ -6365,7 +6371,7 @@ module.exports = (_ => {
|
|||
onItemSelect: this.handleItemSelect.bind(this)
|
||||
})
|
||||
}),
|
||||
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.ScrollerThin, {
|
||||
BDFDB.ReactUtils.createElement(InternalComponents.LibraryComponents.Scrollers.Thin, {
|
||||
className: BDFDB.DOMUtils.formatClassName(this.props.contentClassName, BDFDB.disCN.sidebarcontent),
|
||||
fade: true,
|
||||
children: [selectedElements].flat(10).filter(n => n).map(data => renderElement(data))
|
||||
|
|
|
@ -2374,7 +2374,11 @@
|
|||
BDFDB.MessageUtils.rerenderAll = function (instant) {
|
||||
BDFDB.TimeUtils.clear(MessageRerenderTimeout);
|
||||
MessageRerenderTimeout = BDFDB.TimeUtils.timeout(_ => {
|
||||
BDFDB.ChannelUtils.markAsRead(BDFDB.LibraryModules.LastChannelStore.getChannelId());
|
||||
let channel = BDFDB.LibraryModules.ChannelStore.getChannel(BDFDB.LibraryModules.LastChannelStore.getChannelId());
|
||||
if (channel) {
|
||||
if (BDFDB.DMUtils.isDMChannel(channel)) BDFDB.DMUtils.markAsRead(channel);
|
||||
else BDFDB.ChannelUtils.markAsRead(channel);
|
||||
}
|
||||
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) {
|
||||
|
@ -2715,7 +2719,7 @@
|
|||
};
|
||||
BDFDB.DMUtils.getData = function (eleOrInfoOrId) {
|
||||
if (!eleOrInfoOrId) return null;
|
||||
let id = Node.prototype.isPrototypeOf(eleOrInfoOrId) ? BDFDB.BDFDB.DMUtils.getId(eleOrInfoOrId) : (typeof eleOrInfoOrId == "object" ? eleOrInfoOrId.id : eleOrInfoOrId);
|
||||
let id = Node.prototype.isPrototypeOf(eleOrInfoOrId) ? BDFDB.DMUtils.getId(eleOrInfoOrId) : (typeof eleOrInfoOrId == "object" ? eleOrInfoOrId.id : eleOrInfoOrId);
|
||||
id = typeof id == "number" ? id.toFixed() : id;
|
||||
for (let info of BDFDB.DMUtils.getAll()) if (info && info.id == id) return info;
|
||||
return null;
|
||||
|
@ -2751,7 +2755,7 @@
|
|||
if (!dms) return;
|
||||
let unreadChannels = [];
|
||||
for (let dm of dms = BDFDB.ArrayUtils.is(dms) ? dms : (typeof dms == "string" || typeof dms == "number" ? Array.of(dms) : Array.from(dms))) {
|
||||
let id = Node.prototype.isPrototypeOf(dm) ? BDFDB.BDFDB.DMUtils.getId(dm) : (dm && typeof dm == "object" ? dm.id : dm);
|
||||
let id = Node.prototype.isPrototypeOf(dm) ? BDFDB.DMUtils.getId(dm) : (dm && typeof dm == "object" ? dm.id : dm);
|
||||
if (id) unreadChannels.push(id);
|
||||
}
|
||||
for (let i in unreadChannels) BDFDB.TimeUtils.timeout(_ => {LibraryModules.AckUtils.ack(unreadChannels[i]);}, i * 1000);
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue