Commit graph

1023 commits

Author SHA1 Message Date
Tom Levy
b18e8aa11e Allow importing files with MIME type "application/octet-stream"
Sometimes Android reports the MIME type as "application/octet-stream"
even if the file has a .json extension (specifically, on Android 8 and
9 for backups exported outside the Download folder). Previously, such
files could not be selected in the file picker when importing.

As a workaround, allow files with that MIME type.

Fixes #88.
2024-05-20 01:43:25 +00:00
Tom Levy
7e2202b64a Fix missing .json file extension when exporting messages
Very similar to FossifyOrg/Notes#14 (which has a more detailed commit
message). Basically, some file pickers don't automatically append the
extension, so we should do it ourselves. It doesn't cause problems.

Reported in #88.
2024-05-20 01:43:25 +00:00
Tom Levy
dd2cc7f0e2 Refactor extensions/Context.kt slightly
No behaviour change.

- Simplify insertOrUpdateConversation(), since the previous code was long and
  hard to follow.

- Inline constants into selection queries instead of using '?' arguments.
2024-05-20 01:43:25 +00:00
Tom Levy
9534a1031a Delete exported file on error
If ActivityResultContracts.CreateDocument launches the native Files
app (com.android.documentsui), then it will create the file before the
Uri is returned to us.

So if we don't complete the export (due to an exception or because
there are no messages) we should delete the file, otherwise there will
be an empty/incomplete file left behind.
2024-05-20 01:43:25 +00:00
Tom Levy
1198a8c495 Report OutOfMemoryError when importing and exporting messages
When importing/exporting large files we can run out of memory, in
which case we should display a toast to the user (as we do for other
exceptions). Previously, the OutOfMemoryError was not caught because
it inherits from Error, not from Exception.

(We have to manually call .toString() because Context.showErrorToast()
from Commons takes an Exception or a String, not Throwable.)
2024-05-20 01:43:25 +00:00
ronniedroid
c53f537b63 switched to using ActivityResultContracts 2024-04-29 12:01:17 +03:00
ronniedroid
958644b290 FEATURE: Import and export blocked keywords 2024-01-30 15:42:42 +03:00
Naveen
bc99df1ac8
Update app store metadata 2024-01-22 19:29:46 +05:30
Naveen
0bd9168f23
Remove "More apps from us" from menu 2024-01-20 00:28:56 +05:30
Naveen
7ed5f8fa90
Update notification id 2024-01-19 22:01:15 +05:30
Naveen
6157bc5689
Update contacts package name 2024-01-19 21:59:59 +05:30
Naveen
e2f83f49da
Rename package to org.fossify.messages 2024-01-18 01:05:03 +05:30
Naveen
1d675a1be9
Minor code improvement 2024-01-17 18:55:36 +05:30
Naveen
9e9eebc5ff
Use extension function 2024-01-17 18:20:20 +05:30
Naveen
18ce6557f7
Use extension function 2024-01-17 18:18:24 +05:30
Agnieszka C
535d722936 Added custom notifications 2023-12-22 09:18:47 +01:00
Naveen
a91cebea53
Update launcher icons 2023-12-21 20:13:12 +05:30
Naveen
7c042f7e6c
Remove old release notes 2023-12-21 19:56:45 +05:30
Naveen
2d8a626ec0
Rename package names to org.fossify.* 2023-12-21 18:15:03 +05:30
Naveen
5b3b58aedc
Set placeholder text color 2023-10-05 15:45:21 +05:30
Naveen
30ba6dce5b
Execute clearAllMessagesIfNeeded callback on the main thread 2023-10-05 14:37:19 +05:30
Ensar Sarajčić
625b515064 Update setter variable name for isArchiveAvailable 2023-10-03 10:53:33 +02:00
Ensar Sarajčić
a31af991c5 Rename constant and prefs key for isArchiveAvailable 2023-10-03 10:34:55 +02:00
Ensar Sarajčić
e41630e543 Rename useThreadsArchive to isArchiveAvailable for clarity 2023-10-03 09:46:10 +02:00
Ensar Sarajčić
0e68da2710 Prevent using archive table if it doesn't exist
This closes #773
2023-10-03 09:38:45 +02:00
Naveen
4582bc5289
Properly clear messages from database 2023-09-30 02:21:49 +05:30
Naveen
a87f33f88f
Reset database on app update (again) 2023-09-19 23:41:54 +05:30
tibbi
a62c88a96b fixing a setting label 2023-09-18 21:45:10 +02:00
tibbi
1d370269c1 updating commons 2023-09-11 13:01:19 +02:00
Tibor Kaputa
43ee2a99ba
Merge pull request #730 from naveensingh/show_mms_download_failure
Show error toast when mms download fails
2023-08-24 23:01:12 +02:00
Naveen
9ea707d2ba
Show long error toasts 2023-08-24 23:45:35 +05:30
Naveen
69ff590cf0
Migrate to non-transitive R Classes 2023-08-24 20:59:34 +05:30
Naveen
e76130d037
Show error toast when mms download fails 2023-08-23 15:41:45 +05:30
Naveen
1089d838db
Avoid modifying items while list is being updated
`performFiltering` is always called on a worker thread. UI should only be updated in `publishResults`.
2023-08-22 18:04:08 +05:30
Naveen
c3fe4d8aca
Add a new line 2023-08-22 15:33:48 +05:30
Naveen
cdcc9e2140
Remove unnecessary comma 2023-08-22 15:12:08 +05:30
Naveen
66be224b38
Remove nested apply usage 2023-08-22 15:11:05 +05:30
Naveen
8bc6659d71
Set drawable size in code 2023-08-22 14:27:40 +05:30
Naveen
fead93ddf7
Remove messageHolderBinding variable 2023-08-22 14:09:04 +05:30
Naveen
8ebcaa3016
Add some new lines 2023-08-22 14:01:17 +05:30
Naveen
dccbc6ce7a
Use View binding in AutoCompleteTextViewAdapter.kt 2023-08-18 17:18:30 +05:30
Naveen
c7a9f44663
Minor code improvement 2023-08-17 16:45:03 +05:30
Naveen
0c01e607bb
Migrate from kotlin synthetics to View binding 2023-08-17 15:54:29 +05:30
Ensar Sarajčić
b85661eb4d Always calculate snippet when reading conversations
This ensures that correct snippet is displayed, because of moving
messages to recycle bin. This must be done for conversations in
recycle bin as well as regular conversations, because both can be
affected, depending on which messages are moved to recycle bin.
2023-07-25 15:38:24 +02:00
Ensar Sarajčić
24756285cc Use recycle bin string for deletion when recycle bin is active 2023-07-25 14:54:32 +02:00
Ensar Sarajčić
450a0c22d1 Merge branch 'master' into feature/451-recycle-bin 2023-07-25 08:08:04 +02:00
Tibor Kaputa
96c8b4b1ec
Merge pull request #707 from esensar/fix/554-duplicate-resent-messages
Prevent duplication of messages on resend
2023-07-24 23:32:25 +02:00
Ensar Sarajčić
dbf582b239 Merge branch 'master' into feature/451-recycle-bin 2023-07-24 14:47:50 +02:00
Ensar Sarajčić
312f5bd0a8 Prevent duplication of messages on resend
This prevents duplication by ensuring that message is just
updated in case of SMS, instead of creating a new entry. In case
of MMS, due to the way it is sent internally, we delete original
message once we get result of the new one.

This closes #554
2023-07-24 11:03:48 +02:00
Tibor Kaputa
deecd78650
minor code style update 2023-07-24 10:55:10 +02:00