D15543: [Desktop] SMS plugin no longer creates desktop notifications -- Old functionality still supported by notifications plugin

Nicolas Fella noreply at phabricator.kde.org
Sun Sep 16 20:38:08 BST 2018


nicolasfella added inline comments.

INLINE COMMENTS

> smsplugin.cpp:52
>  {
>      if (np.get<bool>(QStringLiteral("isCancel"))) {
>  

I think this can be removed as well. We don't deal with notifications anymore and it was never implemented anyway

> smsplugin.cpp:58
>  
> -    const QString& event = np.get<QString>(QStringLiteral("event"), QStringLiteral("unknown"));
> -
> -    // Handle old-style packets
> -    // TODO Drop support?
> -    if (np.type() == PACKET_TYPE_TELEPHONY)
> -    {
> -        if (event == QLatin1String("sms"))
> -        {
> -            // New-style packets should be a PACKET_TYPE_TELEPHONY_MESSAGE (15 May 2018)
> -            qCDebug(KDECONNECT_PLUGIN_SMS) << "Handled an old-style Telephony sms packet. You should update your Android app to get the latest features!";
> -            ConversationMessage message(np.body());
> -
> -            // In case telepathy can handle the message, don't do anything else
> -            if (m_telepathyInterface.isValid()) {
> -                forwardToTelepathy(message);
> -                return true;
> -            }
> -
> -            KNotification* n = createNotification(np);
> -            if (n != nullptr) n->sendEvent();
> -                return true;
> -
> -        }
> -    }
> -
> -    if (np.type() == PACKET_TYPE_TELEPHONY_MESSAGE) {
> +    if (np.type() == PACKET_TYPE_SMS_MESSAGES) {
>          return handleBatchMessages(np);

Theoretically the check is not necessary since this is the only packet type that is supported

REPOSITORY
  R224 KDE Connect

REVISION DETAIL
  https://phabricator.kde.org/D15543

To: sredman, #kde_connect
Cc: nicolasfella, kdeconnect, wistak, dvalencia, rmenezes, julioc, Leptopoda, timothyc, jdvr, yannux, Danial0_0, johnq, Pitel, adeen-s, SemperPeritus, ndavis, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, menasshock, tctara, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20180916/9d838c5b/attachment-0001.html>


More information about the KDEConnect mailing list