Search in sources :

Example 1 with ParticipantDetailsTab

use of com.waz.zclient.pages.main.participants.views.ParticipantDetailsTab in project wire-android by wireapp.

the class TabbedParticipantBodyFragment method updateViews.

private void updateViews(User user) {
    if (viewPager == null) {
        return;
    }
    View view = viewPager.findViewWithTag(TabbedParticipantPagerAdapter.ParticipantTabs.DETAILS);
    if (view instanceof ParticipantDetailsTab) {
        ParticipantDetailsTab tab = (ParticipantDetailsTab) view;
        tab.setUser(user);
        final IConversation conversation = getStoreFactory().getConversationStore().getCurrentConversation();
        if (conversation != null) {
            if (conversation.getType() == IConversation.Type.ONE_TO_ONE) {
                tab.updateFooterMenu(R.string.glyph__add_people, R.string.conversation__action__create_group, R.string.glyph__more, R.string.empty_string, callbacks);
            } else {
                tab.updateFooterMenu(R.string.glyph__conversation, R.string.empty_string, R.string.glyph__minus, R.string.empty_string, callbacks);
            }
        }
    }
}
Also used : IConversation(com.waz.api.IConversation) View(android.view.View) ParticipantDetailsTab(com.waz.zclient.pages.main.participants.views.ParticipantDetailsTab)

Aggregations

View (android.view.View)1 IConversation (com.waz.api.IConversation)1 ParticipantDetailsTab (com.waz.zclient.pages.main.participants.views.ParticipantDetailsTab)1