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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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