Commit graph

163 commits

Author SHA1 Message Date
Ashvin Nihalani
c333f2af17 [SMS App] Select Message Text
Switched from QT Label to Text Edit as QA Label is not allowed to select text
https://stackoverflow.com/questions/49784099/qml-how-to-make-text-or-label-selectable
https://bugreports.qt.io/browse/QTBUG-14077

BUG: 418630 - Cannot select text in messaging app
2020-07-05 00:49:31 +00:00
Nicolas Fella
752070add9 Enable highdpi icons 2020-07-01 22:33:08 +02:00
Nicolas Fella
166a88072b [smsapp] Rework message items
The current implementation seems to have an issue with an undetected binding loop that causes lockup. During investigation I figured that the code was way to complex and brittle for what we need.

This is a cleaner reimplementation. It also replaces the custom Avatar component with the one from Kirigami.

The looks are subject to tweaking of course
2020-07-01 19:15:45 +00:00
Aniket Kumar
2b8e95caac [smsapp] Replace custom ListItem with Kirigami's BasicListItem 2020-06-27 18:22:00 +02:00
l10n daemon script
e44e4a4c19 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-20 05:10:40 +02:00
l10n daemon script
653a708727 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-18 05:39:20 +02:00
l10n daemon script
e873eddcde SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-06-17 14:06:59 +02:00
Simon Redman
a9f151947b [SMS App] Stop ChatMessage.qml from rendering HTML 2020-06-06 13:29:06 +00:00
Simon Redman
70c712808f [SMS App] Use helper rather than hard-coding MessageTypeSent in the code 2020-05-29 19:58:54 -07:00
Rihards Skuja
60bf200723 smsapp: fix reference to undefined var in QML
Launching smsapp prints:
qrc:/qml/main.qml:36: ReferenceError: _initialMessage is not defined

This patch applies the changes made to the property from C++ in
c17972881b to QML.
2020-05-30 02:50:13 +00:00
Antonio Larrosa
1d36164230 Use ecm_qt_declare_logging_category to declare the logging categories
This automatizes the generation of logging categories so a
kdeconnect-kde.categories is generated and installed to
/usr/share/qlogging-categories5/ so kdebugsettings can use it.

Also, sets the default logging level to Warning. So now the logs
of users won't be filled with debug messages but they can
modify the configuration easily with kdebugsettings.
2020-05-26 18:55:47 +02:00
Aniket Kumar
fca66244ab improved sorting and filtering methods 2020-05-19 10:07:06 +05:30
Aniket Kumar
d0367f11fb Removing earlier hack to pass an address as a string instead of ConversationAdress type. 2020-05-18 08:11:26 +05:30
Nicolas Fella
785f70c28f [smsapp] Fix starting new conversation 2020-05-12 01:05:38 +02:00
Simon Redman
b8aab3407a [SMS App] Sms helper improvements 2020-05-09 16:50:08 +00:00
Simon Redman
95a62f4fdb [SMS App] Convert tabs to 2 spaces in ChatMessage.qml
How did those get there?
2020-04-23 19:13:44 -07:00
Jiří Wolker
2ef5cd4551 [SMS App] Make SMS message field scrollable
## Summary

This patch makes SMS message field scrollable and limits its height to ⅓
of window height (or ⅔ for smaller windows) so messages in conversation
are shown even when writing very long messages.

## Test Plan (and screenshots)

<small>These screenshots are in APNG and WEBP formats. Download them if
your browser does not support this format.</small>

### Before:

Message field height was not limited. Message field could be even higher
than window. That makes first lines of this field and messages in
conversation inaccessible.

![grab-noscroll.apng](/uploads/70a44ec3abd0e0707cf69f53ee832542/grab-noscroll.apng)

### After:

Message field height is limited to ⅓ or ⅔ of window height. When text
content reaches this threshold, scroll bars will show up.

![grab-scroll.webp](/uploads/489b9bb197a092f715bc2160acc7fd42/grab-scroll.webp)
2020-04-23 17:24:51 -07:00
Jiří Wolker
6abe790aa4 [SMS App] Make SMS character counter width only grow
SMS character counter was changing its width (both growing and
shrinking) so it also resized message field (and that caused text
reflow). This patch makes counter width only grow.

Type SMS that is long enough to make SMS character counter wider than
“Send” button. Remove the text (leave there 150 or 60 chars to keep it
visible). Character counter should keep its width.
2020-04-23 17:19:15 -07:00
Aniket Kumar
1ed998a9b3 some fixes 2020-04-23 02:31:28 +00:00
Aniket Kumar
97fea5e692 Apply suggestion to smsapp/qml/ConversationList.qml 2020-04-23 02:31:28 +00:00
Aniket Kumar
8b54d0b2a6 Apply suggestion to smsapp/conversationssortfilterproxymodel.cpp 2020-04-23 02:31:28 +00:00
Aniket Kumar
d712b1067f Apply suggestion to smsapp/conversationssortfilterproxymodel.cpp 2020-04-23 02:31:28 +00:00
Aniket Kumar
cd0259aba6 Added searching on both fields all the time and generalized check for address 2020-04-23 02:31:28 +00:00
Aniket Kumar
518f161b4f added message diaplay for no matched contacts 2020-04-23 02:31:28 +00:00
Aniket Kumar
b0cffea4a1 minor fix 2020-04-23 02:31:28 +00:00
Aniket Kumar
6827f31aa1 UI chnages and sorting/filtering chnages for multitarget converations 2020-04-23 02:31:28 +00:00
Aniket Kumar
9db5634a6c Made New button static in UI 2020-04-23 02:31:28 +00:00
Aniket Kumar
75c87e6fdf code adjust 2020-04-23 02:31:28 +00:00
Aniket Kumar
d7c93488a8 added new arbitrary contact feature 2020-04-23 02:31:28 +00:00
Aniket Kumar
d26cfd427f Feature to add arbitrray phone numbers 2020-04-23 02:31:28 +00:00
l10n daemon script
5ef95c7c25 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-04-09 06:26:57 +02:00
Nicolas Fella
1013f23e1b Fix trailing whitespace 2020-04-08 10:48:12 +02:00
Nicolas Fella
570b8776c6 Use QString::isEmpty 2020-04-08 10:47:47 +02:00
Nicolas Fella
b35d96b471 Add some const 2020-04-08 10:46:35 +02:00
Nicolas Fella
f8674db931 Don't recreate QRegularExpression for leading zeroes each time
Creating a QRegularExpression is quite expensive and we use the same expression for each run. Sharing it between the runs leads to a significant performance improvement.
2020-04-08 10:25:34 +02:00
l10n daemon script
0e04769a43 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2020-04-07 06:11:40 +02:00
Aniket Kumar
520d2a5695 Move ConversationsSortFilterProxyModel class from conversationlistmodel files to its own files
## Summary

Currently `OurSortFilterProxyModel` class is implemented in the same file with `ConversationListModel` class, which would likely grow in the future.

This MR separates `OurSortFilterProxyModel` class into its own separate file renaming it to `ConversationsSortFilterProxyModel`

https://invent.kde.org/kde/kdeconnect-kde/-/merge_requests/229
2020-03-29 18:25:07 +00:00
Jiří Wolker
365791dc59 Show remaining character count in SMS app
## Summary

This adds character counter below the “Send” button in SMS conversation. It
uses format XXX/Y where XXX is number of characters that can be added
without splitting the SMS into multiple messages (see article
Concatenated SMS on Wikipedia). Y is number of messages in in current
concatenated SMS. The counter is not visible when insertion of 10 7-bit
or 16-bit (depends on SMS encoding) does not create concatenated SMS.

SMS encoding is automatically guessed. 8-bit encodings are not
supported. If the message contains characters that are not supported by GSM 7-bit
encoding, counter automatically switches to UCS-2.

## Test Plan

Try entering some text that is longer than 150 characters in [GSM 03.38 encoding][1] or 60 characters in UCS-2. Number of remaining characters should be visible below the “Send” button. The character counter should show `0` at exactly 160 or 70 characters. Inserting one character should switch the counter to [Concatenated SMS][2] mode when number of messages is shown.

It should show exactly same number as SMS app in Android.

## Screenshots

These images are in APNG.

![grab.apng](/uploads/21ae23f2fa75c7aca487e61ddce94644/grab.apng)
![grab-cz.apng](/uploads/785e670a8598c5a65a4209f17e75f578/grab-cz.apng)

[1]: https://en.wikipedia.org/w/index.php?oldid=932080074#GSM_7-bit_default_alphabet_and_extension_table_of_3GPP_TS_23.038_/_GSM_03.38
[2]: https://en.wikipedia.org/w/index.php?oldid=943185255#Message_size
2020-03-22 18:47:12 +00:00
Aniket Kumar
f211d7e401 Add feature to start new conversation with existing contacts
## Summary

Start a conversation with contacts having no previous conversation with.

It is currently only possible to use the messaging app to send a message to a conversation which already exists.

This patch implements this feature by integrating all contacts having no prior conversation with the recent conversations in the recent conversation list and at the bottom in a sorted manner, something like this,

The contacts are stored in the recent conversation list model as a conversation but with INVALID conversation ID and INVALID conversation DATE.

## Testing

Testing just needs kdeconnect daemon to be recompiled and executed.
2020-03-21 22:57:28 +00:00
Nicolas Fella
af94100952 Move QAbstractItemModel QML workaround to declarativeplugin 2020-03-14 16:44:24 +01:00
Simon Redman
751bca008c Add loading notice while loading conversations 2020-02-03 01:37:25 +00:00
Laurent Montel
0f707cc709 It alreadys added by kaboutdata 2020-01-12 14:46:21 +01:00
Yuri Chornoivan
01c4d0411b Fix minor EBN issues 2019-12-22 09:49:55 +02:00
Yuri Chornoivan
f84b3c8c11 Fix localization of app and smsapp. Patch mainly by Victor Ryzhykh. 2019-12-21 09:59:36 +02:00
Nicolas Fella
a47fbe7215 [smsapp] Move aboutpage action into global drawer/menu 2019-12-19 23:18:11 +01:00
l10n daemon script
56880448fd SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-11-30 05:34:44 +01:00
l10n daemon script
cb307e16b2 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-11-17 05:06:27 +01:00
Yuri Chornoivan
bef029b8f5 Add i18n() 2019-10-23 22:26:33 +03:00
Simon Redman
9c91042441 Add loading indicator while loading conversations 2019-08-24 10:29:44 -07:00
l10n daemon script
392d287b64 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2019-08-11 04:47:22 +02:00