Make sure to focus window for desktop notifs.

Prevent empty pastes of files.
Log push errors.
This commit is contained in:
Paul
2021-06-22 15:43:06 +01:00
parent 548826527c
commit e98a962071
3 changed files with 30 additions and 23 deletions

View File

@@ -263,6 +263,8 @@ function MessageBox({ channel, draft, dispatcher }: Props) {
onChange={files => setUploadState({ type: "attached", files })}
cancel={() => uploadState.type === 'uploading' && uploadState.cancel.cancel("cancel")}
append={files => {
if (files.length === 0) return;
if (uploadState.type === 'none') {
setUploadState({ type: 'attached', files });
} else if (uploadState.type === 'attached') {