Skip to content
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

Feature/conversations #3313

Merged
merged 3 commits into from Oct 13, 2021
Merged

Conversation

AquaWolf
Copy link

Pull Request Checklist

  • Changes has been tested on an Android device or Android emulator with API 21
  • UI change has been tested on both light and dark themes
  • Pull request is based on the develop branch
  • Pull request updates CHANGES.md
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off

Fixes #2734 partially (no bubbles)

Screenshot_1620717825
Screenshot_1620717743
Screenshot_1620717993

Signed-off-by: Philipp Neumann 3daquawolf@gmail.com

@Extarys
Copy link

Extarys commented May 28, 2021

Not sure who we can ping to take a look. I'm sure many users would love this feature!

I noticed some errors in the build process, maybe you need to fix those?

@AquaWolf
Copy link
Author

Yeah there is a typo: workdir/vector/build/generated/resolved/gplayRelease/values-pt/resolved.xml:36: Error: "radio" is a common misspelling; did you mean "rádio" ? [Typos]

But I didn't changed the translations. Can I just change this word or is there some other action required?

I found two bugs:

  1. When logging out and in with another user there is an issue that new conversations are not as priority. I need to clear the list when logging out.
  2. New conversation notifications seems to muted as standard value

I'll try to fix this this weekend or next week.

CHANGES.md Outdated
@@ -259,6 +259,7 @@ Features ✨:
- Spaces beta

Improvements 🙌:
- Priority conversations for Android 11+ (#2734)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change on this file is not needed anymore, can you revert please?

@@ -0,0 +1 @@
Priority conversations for Android 11+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -917,7 +916,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
}

// We cannot use NotificationManagerCompat here.
val setting = context.getSystemService<NotificationManager>()!!.currentInterruptionFilter
val setting = context.getSystemService(NotificationManager::class.java)!!.currentInterruptionFilter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary but fixes some linting for me locally should i revert?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the lint issue you are seeing? I do not see it, nor the CI.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok i will revert this.

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AquaWolf thanks for the PR. Did you try to fix the 2 issues you've found?

@AquaWolf
Copy link
Author

AquaWolf commented Oct 5, 2021

@AquaWolf thanks for the PR. Did you try to fix the 2 issues you've found?

The mute thing didn't appeared anymore.

@AquaWolf
Copy link
Author

AquaWolf commented Oct 5, 2021

because of "shortcut" handling when logging out, there is a method removeAllDynamicShortcuts
actually I don't know where the logout handling is done, this PR is now a bit longer away.
My thoughts the shortcuts: There should be a more specific handling regarding the notification settings in the app (All/Keywords Metions/None) The none and mentions shouldn't be pushed to the shortcut list.
@bmarty I would write you in Matrix perhaps you can give me some hint where the logout handling is done :)

@bmarty
Copy link
Member

bmarty commented Oct 5, 2021

because of "shortcut" handling when logging out, there is a method removeAllDynamicShortcuts actually I don't know where the logout handling is done, this PR is now a bit longer away. My thoughts the shortcuts: There should be a more specific handling regarding the notification settings in the app (All/Keywords Metions/None) The none and mentions shouldn't be pushed to the shortcut list. @bmarty I would write you in Matrix perhaps you can give me some hint where the logout handling is done :)

The method removeAllDynamicShortcuts is already called during log out from this method: https://github.com/vector-im/element-android/blob/develop/vector/src/main/java/im/vector/app/features/home/ShortcutsHandler.kt#L72

Also the CHANGES.md file is not OK. Is it OK for you to rebase the PR so we can have a clean history without any change on this file?

@@ -917,7 +916,7 @@ class NotificationUtils @Inject constructor(private val context: Context,
}

// We cannot use NotificationManagerCompat here.
val setting = context.getSystemService<NotificationManager>()!!.currentInterruptionFilter
val setting = (context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager).currentInterruptionFilter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not fully revert this change?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get a error while compiling letting it as is

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will revert this

@AquaWolf
Copy link
Author

AquaWolf commented Oct 5, 2021

rebased and force pushed on my remote hope it's now better organized and implemented a function to remove all longlived shortcuts when logging out 👍

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I have one more remark, sorry I did not see it in the beginning.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val openRoomIntent = RoomDetailActivity.shortcutIntent(context, roomId)

val shortcut = ShortcutInfoCompat.Builder(context, roomId)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this code to ShortcutCreator?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will handle it. Thanks again for the PR!

@bmarty bmarty enabled auto-merge October 13, 2021 09:02
@bmarty bmarty merged commit 4f51dbd into element-hq:develop Oct 13, 2021
@dkter
Copy link
Contributor

dkter commented Nov 4, 2021

Conversation features have already been supported since #1809? Not sure what this accomplished but it looks like the room avatar cropping bug that I fixed in 5df0bd6 has been reverted.

@Extarys
Copy link

Extarys commented Nov 4, 2021

@dkter According to #1809 (comment) it doesn't support the bubble. This current PR implements it. (From what I can understand)

@dkter
Copy link
Contributor

dkter commented Nov 4, 2021

@dkter According to #1809 (comment) it doesn't support the bubble. This current PR implements it. (From what I can understand)

@Extarys This PR doesn't implement bubbles (see the top post). It seems like it just replaces removeAllDynamicShortcuts with removeLongLivedShortcuts, and duplicates some of the code that's already in ShortcutCreator in NotificationDrawerManager (albeit not using Bitmap.toProfileImageIcon, which should be used to render the room icons correctly).

What seems to be happening now is that shortcuts are sometimes created with the code in ShortcutCreator, and thus have correctly rendered icons, and sometimes are created with the code in NotificationDrawerManager which gives them broken icons.

It looks like there's been a major refactoring of the notification code since this PR, but the redundant code still exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add new android notification features (Chat bubbles, priority conversations)
5 participants