Simplify receiving multiple files using only 1 notification
ClosedPublic

Authored by eduisters on Dec 16 2018, 4:33 PM.

Details

Summary

Sequentially receiving multiple files was overly complicated sometimes leading to a progress
notification being shown indefinitely. When files are shared using an older kdeconnect-kde version
fallback to receiving each file individually

Test Plan

Send multiple files from desktop to android and observe that android receives the files
sequentially using only 1 notification

Send multiple files from an kdeconnect-kde installation and observe that android receives the
files in parallel using multiple notifications

Diff Detail

Repository
R225 KDE Connect - Android application
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
eduisters created this revision.Dec 16 2018, 4:33 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptDec 16 2018, 4:33 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
eduisters requested review of this revision.Dec 16 2018, 4:33 PM
nicolasfella requested changes to this revision.Jan 5 2019, 7:31 PM
nicolasfella added a subscriber: nicolasfella.

This needs rebasing

This revision now requires changes to proceed.Jan 5 2019, 7:31 PM
eduisters updated this revision to Diff 48798.Jan 6 2019, 1:06 PM
  • Rebased onto master
albertvaka accepted this revision.Jan 7 2019, 10:52 AM
albertvaka added a subscriber: albertvaka.
albertvaka added inline comments.
src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java
214

Why only save it if it hasNumberOfFiles? If I understand correctly, we could still add more files to it from another networkpacket.

eduisters added inline comments.Jan 7 2019, 2:54 PM
src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java
214

That was a while ago but when the packet comes from an old kdeconnect-kde version or the file should be opened the new job is scheduled and forgotten. If not keep it around so additional packets can be added to it

ping -s 1 -c 1 -q

nicolasfella resigned from this revision.Jan 21 2019, 3:49 PM
This revision is now accepted and ready to land.Jan 21 2019, 3:49 PM
This revision was automatically updated to reflect the committed changes.