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

QuickContact in GroupMembersDialog #3033

Closed
wants to merge 1 commit into from
Closed

QuickContact in GroupMembersDialog #3033

wants to merge 1 commit into from

Conversation

@chr1shaefn3r
Copy link
Contributor

@chr1shaefn3r chr1shaefn3r commented Apr 22, 2015

Added onClickListener to the GroupMembersDialog which gives the same functionality as taps on avatars.

Fixes #2837

@mcginty
Copy link
Contributor

@mcginty mcginty commented Apr 29, 2015

At least in Gingerbread, clicking on a group contact results in a NPE so marking this as higher priority as it solves a crash bug.

@mcginty mcginty added this to the 2.14.0 milestone Apr 29, 2015
}
}

GroupMembers groupMembers = new GroupMembers(context, members);
Copy link
Member

@moxie0 moxie0 Apr 29, 2015

i think it's fine the way it is, we don't need a whole new class that is another way to represent recipients

Copy link
Contributor Author

@chr1shaefn3r chr1shaefn3r Apr 30, 2015

The problem I needed to solve was to match the index I get from the Dialog via the onClick callback to the correct recipient (this was not the case with the current implementation as the String[] was disconnect from the List).
Easy solution would be to not put 'Me' on top, but I liked that feature.
Therefore somebody needs to handle the reordering of the List, giving out the proper String[] and then be able to retrieve the correct Recipient via index.
To me this represents one responsiblity, so I put it in a new class.
(I must admit, this looks like an awful lot of code, for just implementing the onClick)

@rhodey
Copy link
Contributor

@rhodey rhodey commented May 7, 2015

clicking on a group contact still results in an NPE, Nexus 5 Lollipop 5.1, built from today's master 356d994. higher priority still for sure.

05-07 10:45:56.609  23925-23925/org.thoughtcrime.securesms.sushi D/AndroidRuntime﹕ Shutting down VM
05-07 10:45:56.609  23925-23925/org.thoughtcrime.securesms.sushi E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: org.thoughtcrime.securesms.sushi, PID: 23925
    java.lang.NullPointerException: Attempt to invoke interface method 'void com.afollestad.materialdialogs.MaterialDialog$ListCallback.onSelection(com.afollestad.materialdialogs.MaterialDialog, android.view.View, int, java.lang.CharSequence)' on a null object reference
            at com.afollestad.materialdialogs.MaterialDialog.onItemClick(MaterialDialog.java:169)
            at android.widget.AdapterView.performItemClick(AdapterView.java:305)
            at android.widget.AbsListView.performItemClick(AbsListView.java:1146)
            at android.widget.AbsListView$PerformClick.run(AbsListView.java:3053)
            at android.widget.AbsListView$3.run(AbsListView.java:3860)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
05-07 10:45:57.770  23925-23985/org.thoughtcrime.securesms.sushi W/WebSocketConnection﹕ Sending keep alive...

@moxie0 moxie0 closed this in 417a4b8 May 7, 2015
@chr1shaefn3r chr1shaefn3r deleted the feature/QuickContactInGroupMembersDialog branch Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants