beta12 for porting old format
This commit is contained in:
Vendored
+3
-1
@@ -1751,11 +1751,12 @@
|
|||||||
};
|
};
|
||||||
// load
|
// load
|
||||||
this.loadInfo = () => {
|
this.loadInfo = () => {
|
||||||
const info = this.storageModel.readStringifiable(
|
let info = this.storageModel.readStringifiable(
|
||||||
this.getInfoPath(),
|
this.getInfoPath(),
|
||||||
ChatInfoReference
|
ChatInfoReference
|
||||||
);
|
);
|
||||||
this.info = info || _ChatModel.generateChatInfo("0", "0", "standard" /* Standard */);
|
this.info = info || _ChatModel.generateChatInfo("0", "0", "standard" /* Standard */);
|
||||||
|
this.storeInfo();
|
||||||
};
|
};
|
||||||
this.handleInfo = (info) => {
|
this.handleInfo = (info) => {
|
||||||
this.info = info;
|
this.info = info;
|
||||||
@@ -1958,6 +1959,7 @@
|
|||||||
this.handleFileContent(fileContent);
|
this.handleFileContent(fileContent);
|
||||||
};
|
};
|
||||||
this.handleFileContent = (fileContent) => {
|
this.handleFileContent = (fileContent) => {
|
||||||
|
console.log(fileContent.type);
|
||||||
if (fileContent.type == "chat-info") {
|
if (fileContent.type == "chat-info") {
|
||||||
if (checkMatchesObjectStructure(fileContent, ChatInfoReference) == false) return;
|
if (checkMatchesObjectStructure(fileContent, ChatInfoReference) == false) return;
|
||||||
this.chatModel.handleInfo(fileContent);
|
this.chatModel.handleInfo(fileContent);
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
const VERSION = "2610 Beta 11"
|
const VERSION = "2610 Beta 12"
|
||||||
|
|
||||||
function processUrl(event) {
|
function processUrl(event) {
|
||||||
const url = event.request.url;
|
const url = event.request.url;
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
2610 Beta 11
|
2610 Beta 12
|
||||||
|
|||||||
@@ -285,11 +285,12 @@ export default class ChatModel {
|
|||||||
|
|
||||||
// load
|
// load
|
||||||
readonly loadInfo = (): void => {
|
readonly loadInfo = (): void => {
|
||||||
const info: ChatInfoFileContent | null = this.storageModel.readStringifiable(
|
let info: ChatInfoFileContent | null = this.storageModel.readStringifiable(
|
||||||
this.getInfoPath(),
|
this.getInfoPath(),
|
||||||
ChatInfoReference,
|
ChatInfoReference,
|
||||||
);
|
);
|
||||||
this.info = (info || ChatModel.generateChatInfo("0", "0", Colors.Standard));
|
this.info = (info || ChatModel.generateChatInfo("0", "0", Colors.Standard));
|
||||||
|
this.storeInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly handleInfo = (info: ChatInfoFileContent): void => {
|
readonly handleInfo = (info: ChatInfoFileContent): void => {
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ export default class FileModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly handleFileContent = (fileContent: FileContent<string>): void => {
|
readonly handleFileContent = (fileContent: FileContent<string>): void => {
|
||||||
|
console.log(fileContent.type);
|
||||||
|
|
||||||
if (fileContent.type == "chat-info") {
|
if (fileContent.type == "chat-info") {
|
||||||
if (checkMatchesObjectStructure(fileContent, ChatInfoReference) == false) return;
|
if (checkMatchesObjectStructure(fileContent, ChatInfoReference) == false) return;
|
||||||
this.chatModel.handleInfo(fileContent as ChatInfoFileContent);
|
this.chatModel.handleInfo(fileContent as ChatInfoFileContent);
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default class FileTransferModel {
|
|||||||
};
|
};
|
||||||
|
|
||||||
readonly handleDecryptedFile = (data: string): void => {
|
readonly handleDecryptedFile = (data: string): void => {
|
||||||
const parsed: any = parse(data);
|
const parsed: any = parse(data);
|
||||||
const isFileData: boolean = checkMatchesObjectStructure(
|
const isFileData: boolean = checkMatchesObjectStructure(
|
||||||
parsed,
|
parsed,
|
||||||
FileDataReference,
|
FileDataReference,
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ export function parseValidObject<T>(string: string, reference: T): T | null {
|
|||||||
parsed,
|
parsed,
|
||||||
reference,
|
reference,
|
||||||
);
|
);
|
||||||
if (doesMatchReference == false) return null;
|
if (doesMatchReference == false) return null;
|
||||||
|
|
||||||
return parsed;
|
return parsed;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user