Combine multiple upload jobs for files into a single KCompositeJob so only 1 notification will be shown
Includes changes introduced in D16279
Details
- Reviewers
albertvaka nicolasfella - Group Reviewers
KDE Connect - Commits
- R224:b6c15289f511: Combine multiple upload jobs into a single KCompositeJob so only 1 notification…
- Share of multiple files is performed using 1 composite job
Setup:- Select multiple (big) files in dolphin and share with an Android device Result:
- The files will be transferred using 1 CompositeUploadJob and showing only 1 notification
- Share of file while another share is already running adds job to existing composite job
Setup:- Select multiple (big) files in dolphin and share with an Android device
- Share an additional file with the same Android device Result:
- The files are all transferred using 1 CompositeUploadJob and showing only 1 notification
- The notification is updated after adding the last file
- Other packets are transmitted as usual
Setup:- Setup sharing desktop notification with device
- Share a big file with an Android device
- Generate a desktop notification (eg. sending or receiving an email)
Result: - Notification packet is send immediately
Diff Detail
- Repository
- R224 KDE Connect
- Branch
- composite_job_for_uploads
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 5532 Build 5550: arc lint + arc unit
This is for sending so does not solve 390876. I will do receiving on Android next, then update sending from Android and last but not least BUG 390876
Something weird is going on when sending files over a super fast connection. While remote is still receiving a file this side already starts sending the next file when its finished transmitting the previous one.
Turns out that it can happen that the payload is transmitted completely but android is still processing it internally. Fixed the threading issue I had on the Android side
Other than that, LGTM.
cli/kdeconnect-cli.cpp | ||
---|---|---|
168 | for (const QVariant &variant : qAsConst(urls)) { |
cli/kdeconnect-cli.cpp | ||
---|---|---|
168 | I don't know why I used QVariant here (probably because I was fighting with msg.setArguments for a while). I assume that using for (const QString &url : qAsConst(urls)) is ok as well? |
The only thing, but seems hard to fix is: when there is a transfer in progress and I add another file, the job is updated to say "sending N+1 files", but on Android it still says "receiving N files".
On android it will be updated when the next share packet is received (see D17157). I've thought about that but it I don't think there is a way to improve this without a 2-way protocol or introducing a new share packet to update the running transfer info