Add actions to notifications
ClosedPublic

Authored by nicolasfella on Apr 17 2018, 6:36 PM.

Details

Summary

When Android sends a list of possible actions add them to the notification. When the action is triggered send a package containing the id and the action back
CCBUG: 366475

Test Plan

Send dummy notification, see the actions, trigger it, look for received package on Android

Diff Detail

Repository
R224 KDE Connect
Branch
notificationactions
Lint
No Linters Available
Unit
No Unit Test Coverage
nicolasfella created this revision.Apr 17 2018, 6:36 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptApr 17 2018, 6:36 PM
nicolasfella requested review of this revision.Apr 17 2018, 6:36 PM
mtijink added inline comments.
plugins/notifications/notification.cpp
114

Do we need a check/index change here when we add "Reply" here?

204

Leftover debug?

plugins/notifications/notificationsdbusinterface.h
55

I think key should be replyId or something like that.

broulik added inline comments.
plugins/notifications/notification.cpp
114

Not sure if that can happen but it looks like you might clear m_actions at a point where a notifications still shown and then m_actions[actionIndex] would be out of bounds

And also, like the previous comment, when "Reply" is added, the index shifts.

128

You change m_actions after having called setActions() above

132

Whitespace

MatMaul added a subscriber: MatMaul.Jun 3 2018, 5:15 PM
Restricted Application added a subscriber: kdeconnect. · View Herald TranscriptJun 3 2018, 5:15 PM
MatMaul removed a subscriber: MatMaul.Jun 3 2018, 5:16 PM
apol requested changes to this revision.Jul 26 2018, 5:47 PM
apol added a subscriber: apol.

Can you please look into Kai's comments?

This revision now requires changes to proceed.Jul 26 2018, 5:47 PM
nicolasfella edited the summary of this revision. (Show Details)Sep 26 2018, 11:38 PM
apol accepted this revision.Feb 8 2019, 10:17 PM
This revision is now accepted and ready to land.Feb 8 2019, 10:17 PM
This revision was automatically updated to reflect the committed changes.