mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
updated failed message handler
This commit is contained in:
parent
cd7b0f6045
commit
6f28598e6f
3 changed files with 20 additions and 4 deletions
|
@ -51,7 +51,8 @@
|
|||
<!-- Display formatted timestamp in card-footer -->
|
||||
</div>
|
||||
|
||||
<div class="card-footer p-0 border-top-0" v-if="message.percent < 100">
|
||||
<div class="card-footer p-0 border-top-0" v-if="message.percent < 100 || message.status === 'failed'"
|
||||
>
|
||||
<div
|
||||
class="progress rounded-0 rounded-bottom"
|
||||
:style="{ height: '10px' }"
|
||||
|
|
|
@ -112,7 +112,7 @@ function saveSettings() {
|
|||
id="max_retry_attempts"
|
||||
@change="saveSettings"
|
||||
v-model="settings.max_retry_attempts"
|
||||
disabled
|
||||
|
||||
>
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
|
|
|
@ -202,9 +202,14 @@ export function newMessage(
|
|||
filename = chatFileName;
|
||||
} else {
|
||||
file = "";
|
||||
filetype = "text";
|
||||
filetype = "";
|
||||
filename = "";
|
||||
}
|
||||
|
||||
console.log(file)
|
||||
console.log(filetype)
|
||||
console.log(filename)
|
||||
|
||||
var file_checksum = ""; //crc32(file).toString(16).toUpperCase();
|
||||
var message_type = "transmit";
|
||||
var command = "msg";
|
||||
|
@ -549,7 +554,17 @@ export async function updateAllChat(cleanup) {
|
|||
console.log(item);
|
||||
databaseUpsert(item.uuid, "status", "failed");
|
||||
updateUnsortedChatListEntry(item.uuid, "status", "failed");
|
||||
databaseUpsert(item.uuid, "percent", 0);
|
||||
updateUnsortedChatListEntry(item.uuid, "percent", 0);
|
||||
}
|
||||
// lets update the message if it is failed. Then its always 0 percent
|
||||
if (item.status == "failed") {
|
||||
databaseUpsert(item.uuid, "percent", 0);
|
||||
updateUnsortedChatListEntry(item.uuid, "percent", 0);
|
||||
databaseUpsert(item.uuid, "bytesperminute", 0);
|
||||
updateUnsortedChatListEntry(item.uuid, "bytesperminute", 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -875,7 +890,7 @@ export function requestMessageInfo(id) {
|
|||
// id and uuid are the same
|
||||
var data = getFromUnsortedChatListByUUID(id);
|
||||
chat.selectedMessageObject = data;
|
||||
|
||||
console.log(data)
|
||||
if (
|
||||
typeof data["speed_list"] !== "undefined" &&
|
||||
data["speed_list"].length > 0
|
||||
|
|
Loading…
Reference in a new issue