Clipboard sync on new connections
ClosedPublic

Authored by credman on Jul 20 2019, 2:38 PM.

Details

Summary

Timestamp on changes to clipboards so that when a new device connects it can sync both clipboards to the most recent updated clipboard.

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.
credman created this revision.Jul 20 2019, 2:38 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptJul 20 2019, 2:38 PM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
credman requested review of this revision.Jul 20 2019, 2:38 PM
sredman added a subscriber: sredman.
sredman added inline comments.
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardListener.java
95

Space after {

src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardPlugin.java
74

Spaces

90–91

It would be nice to write down the packet format, especially since a new field has just appeared. I usually do this in a block comment on the packet type definition (PACKET_TYPE_CLIPBOARD)

credman updated this revision to Diff 62204.Jul 21 2019, 3:55 PM

Review changes

sredman added inline comments.Jul 21 2019, 6:14 PM
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardListener.java
99

Add space

albertvaka added inline comments.
src/org/kde/kdeconnect/Plugins/ClibpoardPlugin/ClipboardPlugin.java
75

If we send the contents onCreate, we probably don't need this.

albertvaka accepted this revision.Jul 21 2019, 6:28 PM

Just one minor nit, but looks good to me. Thanks for the patch!

This revision is now accepted and ready to land.Jul 21 2019, 6:28 PM
credman updated this revision to Diff 62277.Jul 22 2019, 10:17 AM
  • Added new packet type for new connection syncs
  • Added missing timestamp update
credman updated this revision to Diff 62280.Jul 22 2019, 10:21 AM
credman marked 4 inline comments as done.
  • Added space to method bracket
credman marked an inline comment as done.Jul 22 2019, 10:22 AM

LGTM! I assume you don't have a developer account, so I'll merge it.

This revision was automatically updated to reflect the committed changes.