fixing errors and typos

This commit is contained in:
MathMan05 2024-07-20 15:09:17 -05:00
parent ec6ab101c0
commit 8d16bce7ec
7 changed files with 22 additions and 25 deletions

View file

@ -35,7 +35,7 @@ class Channel {
allthewayup;
static contextmenu = new Contextmenu("channel menu");
replyingto;
infinate;
infinite;
idToPrev = {};
idToNext = {};
static setupcontextmenu() {
@ -71,9 +71,9 @@ class Channel {
return order;
});
}
setUpInfinateScroller() {
setUpInfiniteScroller() {
const ids = {};
this.infinate = new InfiniteScroller(async function (id, offset) {
this.infinite = new InfiniteScroller(async function (id, offset) {
if (offset === 1) {
if (this.idToPrev[id]) {
return this.idToPrev[id];
@ -129,7 +129,7 @@ class Channel {
this.position = JSON.position;
this.lastreadmessageid = null;
this.lastmessageid = JSON.last_message_id;
this.setUpInfinateScroller();
this.setUpInfiniteScroller();
}
isAdmin() {
return this.guild.isAdmin();
@ -517,7 +517,7 @@ class Channel {
this.myhtml.classList.add("viewChannel");
this.guild.prevchannel = this;
this.localuser.channelfocus = this;
const prom = this.infinate.delete();
const prom = this.infinite.delete();
await this.putmessages();
await prom;
if (id !== Channel.genid) {
@ -612,7 +612,7 @@ class Channel {
buildmessages() {
const messages = document.getElementById("channelw");
messages.innerHTML = "";
messages.append(this.infinate.getDiv(this.lastmessageid));
messages.append(this.infinite.getDiv(this.lastmessageid));
}
updateChannel(JSON) {
this.type = JSON.type;
@ -723,7 +723,7 @@ class Channel {
}
}
this.guild.unreads();
this.infinate.addedBottom();
this.infinite.addedBottom();
if (messagez.author === this.localuser.user) {
return;
}

View file

@ -82,7 +82,7 @@ class Group extends Channel {
this.lastmessageid = JSON.last_message_id;
this.lastmessageid ??= "0";
this.mentions = 0;
this.setUpInfinateScroller();
this.setUpInfiniteScroller();
}
createguildHTML() {
const div = document.createElement("div");
@ -104,7 +104,7 @@ class Group extends Channel {
}
this.guild.prevchannel = this;
this.localuser.channelfocus = this;
const prom = this.infinate.delete();
const prom = this.infinite.delete();
await this.putmessages();
await prom;
if (id !== Channel.genid) {
@ -132,7 +132,7 @@ class Group extends Channel {
}
}
this.unreads();
this.infinate.addedBottom();
this.infinite.addedBottom();
if (messagez.author === this.localuser.user) {
return;
}

View file

@ -84,7 +84,7 @@ class Localuser {
outoffocus() {
document.getElementById("servers").textContent = "";
document.getElementById("channels").textContent = "";
this.channelfocus.infinate.delete();
this.channelfocus.infinite.delete();
this.lookingguild = null;
this.channelfocus = null;
}

View file

@ -43,7 +43,7 @@ class Channel{
allthewayup:boolean;
static contextmenu=new Contextmenu("channel menu");
replyingto:Message;
infinate:InfiniteScroller;
infinite:InfiniteScroller;
idToPrev:{[key:string]:string}={};
idToNext:{[key:string]:string}={};
static setupcontextmenu(){
@ -85,9 +85,9 @@ class Channel{
return order;
})
}
setUpInfinateScroller(){
setUpInfiniteScroller(){
const ids:{[key:string]:Function}={};
this.infinate=new InfiniteScroller(async function(id:string,offset:number){
this.infinite=new InfiniteScroller(async function(id:string,offset:number){
if(offset===1){
if(this.idToPrev[id]){
return this.idToPrev[id];
@ -145,7 +145,7 @@ class Channel{
this.position=JSON.position;
this.lastreadmessageid=null;
this.lastmessageid=JSON.last_message_id;
this.setUpInfinateScroller();
this.setUpInfiniteScroller();
}
isAdmin(){
return this.guild.isAdmin();
@ -528,7 +528,7 @@ class Channel{
this.myhtml.classList.add("viewChannel")
this.guild.prevchannel=this;
this.localuser.channelfocus=this;
const prom=this.infinate.delete();
const prom=this.infinite.delete();
await this.putmessages();
await prom;
if(id!==Channel.genid){
@ -618,7 +618,7 @@ class Channel{
buildmessages(){
const messages=document.getElementById("channelw");
messages.innerHTML="";
messages.append(this.infinate.getDiv(this.lastmessageid));
messages.append(this.infinite.getDiv(this.lastmessageid));
}
updateChannel(JSON){
this.type=JSON.type;
@ -722,7 +722,7 @@ class Channel{
}
}
this.guild.unreads();
this.infinate.addedBottom();
this.infinite.addedBottom();
if(messagez.author===this.localuser.user){
return;
}

View file

@ -84,7 +84,7 @@ class Group extends Channel{
this.lastmessageid=JSON.last_message_id;
this.lastmessageid??="0";
this.mentions=0;
this.setUpInfinateScroller();
this.setUpInfiniteScroller();
}
createguildHTML(){
const div=document.createElement("div")
@ -106,7 +106,7 @@ class Group extends Channel{
}
this.guild.prevchannel=this;
this.localuser.channelfocus=this;
const prom=this.infinate.delete();
const prom=this.infinite.delete();
await this.putmessages();
await prom;
if(id!==Channel.genid){
@ -133,7 +133,7 @@ class Group extends Channel{
}
}
this.unreads();
this.infinate.addedBottom();
this.infinite.addedBottom();
if(messagez.author===this.localuser.user){
return;
}

View file

@ -91,7 +91,7 @@ class Localuser{
outoffocus():void{
document.getElementById("servers").textContent="";
document.getElementById("channels").textContent="";
this.channelfocus.infinate.delete();
this.channelfocus.infinite.delete();
this.lookingguild=null;
this.channelfocus=null;
}

View file

@ -1356,9 +1356,6 @@ span {
flex-direction: column;
max-height:100in;
}
<<<<<<< Updated upstream
=======
.sizeupdown{
height:4in;
}
>>>>>>> Stashed changes