-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shortcuts for conversations #280
base: master
Are you sure you want to change the base?
Shortcuts for conversations #280
Conversation
# Conflicts: # app/src/main/kotlin/org/fossify/messages/extensions/Context.kt
Thanks for contributing! I've tested it and found some problems:
|
import org.fossify.messages.extensions.* | ||
import org.fossify.messages.helpers.* | ||
import org.fossify.messages.messaging.* | ||
import org.fossify.messages.models.* | ||
import org.fossify.messages.models.ThreadItem.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not wildcard imports. We are moving away from it.
try { | ||
sanitizer.sanitizeByThrowing(intent) | ||
} catch (e: Exception) { | ||
toast(e.message ?: getString(org.fossify.commons.R.string.unknown_error_occurred)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use the showErrorToast(e)
extension like everywhere else. Better exception handling is planned but this is not the way.
val draft = try { | ||
draftsDB.getDraftById(id) | ||
} catch (e: Exception) { | ||
if (e.message == "Cannot access database on the main thread since it may potentially lock the UI for a long period of time.") { | ||
null | ||
} else { | ||
throw e | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is always supposed to be called in a background thread.
Also, that's not a good way to catch an exception.
Hi, everything you've mentionned should be ok now except for your second point @Aga-C , I don't know about private contacts so i've tried something but if it's not working please could you give me more details on how to handle this ? |
Private contacts are contacts stored in Fossify Contacts as not visible for other apps (but still can be accessed by other Fossify apps). It's still not working. Probably that's because for the title you rely only on conversation title. See how it's done inside the app to ensure that the correct title is always displayed: Messages/app/src/main/kotlin/org/fossify/messages/activities/ThreadActivity.kt Lines 1003 to 1010 in 9d324b4
Also, I've found some more bugs while testing:
|
Hi again, I was able to do necessary changes. Tell me if there is anything else I can do |
Seems that everything works fine, thanks! |
What is it?
Description of the changes in your PR
This changes add conversation shortcuts to the launcher. They also aim to integrate the app in the Android conversation space.
Fixes the following issue(s)
Acknowledgement