Search in sources :

Example 1 with IConversationScreenController

use of com.waz.zclient.pages.main.conversation.controller.IConversationScreenController in project wire-android by wireapp.

the class ParticipantsDialogFragment method onStart.

@Override
public void onStart() {
    super.onStart();
    getStoreFactory().getParticipantsStore().addParticipantsStoreObserver(this);
    final IConversationScreenController conversationScreenController = getControllerFactory().getConversationScreenController();
    conversationScreenController.addConversationControllerObservers(this);
    getControllerFactory().getGlobalLayoutController().addKeyboardHeightObserver(this);
    getControllerFactory().getPickUserController().addPickUserScreenControllerObserver(this);
    getControllerFactory().getConfirmationController().addConfirmationObserver(this);
    getControllerFactory().getAccentColorController().addAccentColorObserver(this);
    if (conversationScreenController.shouldShowDevicesTab()) {
        conversationScreenController.showUser(conversationScreenController.getRequestedDeviceTabUser());
    }
}
Also used : IConversationScreenController(com.waz.zclient.pages.main.conversation.controller.IConversationScreenController)

Example 2 with IConversationScreenController

use of com.waz.zclient.pages.main.conversation.controller.IConversationScreenController in project wire-android by wireapp.

the class ConversationFragmentTest method assertToolbarOneToOneParticipants.

@Test
public void assertToolbarOneToOneParticipants() {
    String conversationName = "ConversationName";
    IConversation mockConversation = mock(IConversation.class);
    when(mockConversation.getName()).thenReturn(conversationName);
    when(mockConversation.getType()).thenReturn(IConversation.Type.ONE_TO_ONE);
    when(mockConversation.isMemberOfConversation()).thenReturn(true);
    IConversationScreenController mockScreenController = activity.getControllerFactory().getConversationScreenController();
    MockHelper.setupConversationMocks(mockConversation, activity);
    attachFragment(ConversationFragment.newInstance(), ConversationFragment.TAG);
    onView(withText(conversationName)).perform(click());
    verify(mockScreenController).showParticipants(any(View.class), anyBoolean());
}
Also used : IConversation(com.waz.api.IConversation) IConversationScreenController(com.waz.zclient.pages.main.conversation.controller.IConversationScreenController) View(android.view.View) Espresso.onView(android.support.test.espresso.Espresso.onView) FragmentTest(com.waz.zclient.testutils.FragmentTest) Test(org.junit.Test)

Aggregations

IConversationScreenController (com.waz.zclient.pages.main.conversation.controller.IConversationScreenController)2 Espresso.onView (android.support.test.espresso.Espresso.onView)1 View (android.view.View)1 IConversation (com.waz.api.IConversation)1 FragmentTest (com.waz.zclient.testutils.FragmentTest)1 Test (org.junit.Test)1