D17634: [SMS App] Make sms app not crash when conversation is selected with no devices connected

Simon Redman noreply at phabricator.kde.org
Sun Dec 16 20:22:52 GMT 2018


sredman created this revision.
sredman added a reviewer: KDE Connect.
Herald added a project: KDE Connect.
Herald added a subscriber: kdeconnect.
sredman requested review of this revision.

REVISION SUMMARY
  This patch fixes T10183 <https://phabricator.kde.org/T10183> and stops the SMS app from crashing when a conversation is selected but no devices are connected. It also allows the SMS app to access the cached messages in the ConversationsDbusInterface so the app is still slightly useful even when the device is disconnected.

TEST PLAN
  - Open sms app
  - Open a few conversations
  - Disconnect phone (Force close app?)
  - Re-open a conversation which was previously opened
    - Verify that the messages appear. It is possible to scroll up to view any older cached messages too!
  - Open a conversation which was not opened previously
    - Verify that a single messages is shown (since this was the only one in cache, from populating the list of all conversations)
    - Verify that attempting to scroll this conversation does nothing, but also does not crash the app
  
  Note: Opening the app with no phone connected will cause it to lose its handle on the deviceId, so it can't spawn a new Dbus interface, so it will remain blank and empty. Solving that is a project for another day.

REPOSITORY
  R224 KDE Connect

BRANCH
  smsapp-cachable

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

AFFECTED FILES
  plugins/sms/conversationsdbusinterface.cpp
  plugins/sms/requestconversationworker.cpp
  plugins/sms/requestconversationworker.h
  smsapp/conversationlistmodel.cpp
  smsapp/qml/ConversationDisplay.qml
  smsapp/qml/ConversationList.qml

To: sredman, #kde_connect
Cc: kdeconnect, mschroeder, varunp, shivanshukantprasad, skymoore, brute4s99, wistak, anoopv, dvalencia, rmenezes, julioc, Leptopoda, timothyc, Danial0_0, johnq, Pitel, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, menasshock, mikesomov, tctara, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20181216/9c3ff41d/attachment.html>


More information about the KDEConnect mailing list