<table><tr><td style="">cubix added a comment.
</td></tr></table><br /><div><div><p>I went throught the smsplugin in the c++ and the java side.</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">private class MessageContentObserver extends ContentObserver {
/**
* Create a ContentObserver to watch the Messages database. onChange is called for
* every subscribed change
*
* @param handler Handler object used to make the callback
*/
MessageContentObserver(Handler handler) {
super(handler);
}
/**
* The onChange method is called whenever the subscribed-to database changes
*
* In this case, this onChange expects to be called whenever *anything* in the Messages
* database changes and simply reports those updated messages to anyone who might be listening
*/
@Override
public void onChange(boolean selfChange) {
// If the KDE Connect is set as default Sms app
// prevent from reading the latest message in the database before the sentReceivers mark it as sent
if (Utils.isDefaultSmsApp(context)) {
return;
}
sendLatestMessage();
}
}</pre></div>
<p>This is the code on the java side which sends the newest message. Should we create a change in this method so that it takes into consideration changes when messages are deleted as well?</p></div></div><br /><div><strong>TASK DETAIL</strong><div><a href="https://phabricator.kde.org/T10650">https://phabricator.kde.org/T10650</a></div></div><br /><div><strong>To: </strong>cubix<br /><strong>Cc: </strong>aniketkumar, cubix, KDE Connect, sredman, lissacoffeey, venky, KunalRaghav, ankitbaluni, ankit, aliencode, Orage, ritwizsinha, dshelley, pawelkwiecinski, ctakano, vporvaznik, mschroeder, varunp, shivanshukantprasad, skymoore, fbampaloukas, brute4s99, wistak, anoopv, dvalencia, rmenezes, julioc, Leptopoda, timothyc, Danial0_0, johnq, Pitel, domson, adeen-s, SemperPeritus, daniel.z.tg, jeanv, seebauer, bugzy, MayeulC, lemuel, menasshock, mikesomov, tctara, apol<br /></div>