Commit 919ff218 authored by Grigory Fedorov's avatar Grigory Fedorov

ContactViewer and ContactEditor menu calls changed.

parent 9a91549a
......@@ -142,12 +142,12 @@
<activity
android:label="@string/contact_editor"
android:name="com.xabber.android.ui.ContactEditor"
android:parentActivityName="com.xabber.android.ui.ContactList"
android:parentActivityName="com.xabber.android.ui.ContactViewer"
>
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xabber.android.ui.ContactList" />
android:value="com.xabber.android.ui.ContactViewer" />
</activity>
<activity
android:label="@string/contact_add"
......@@ -220,12 +220,12 @@
<activity
android:label="@string/contact_viewer"
android:name="com.xabber.android.ui.ContactViewer"
android:parentActivityName="com.xabber.android.ui.ContactList"
android:parentActivityName="com.xabber.android.ui.ChatViewer"
>
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.xabber.android.ui.ContactList" />
android:value="com.xabber.android.ui.ChatViewer" />
<intent-filter>
<action android:name="android.intent.action.VIEW" />
......
......@@ -221,7 +221,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
}
if (abstractChat instanceof RegularChat) {
menu.findItem(R.id.action_edit_contact).setVisible(true);
menu.findItem(R.id.action_view_contact).setVisible(true);
menu.findItem(R.id.action_close_chat).setVisible(true);
SecurityLevel securityLevel = OTRManager.getInstance().getSecurityLevel(account, user);
......@@ -313,8 +313,8 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
final String user = actionWithUser;
switch (item.getItemId()) {
case R.id.action_edit_contact:
startActivity(ContactEditor.createIntent(this, account, user));
case R.id.action_view_contact:
startActivity(ContactViewer.createIntent(this, account, user));
return true;
case R.id.action_chat_list:
......
......@@ -63,17 +63,6 @@ public class ContextMenuHelper {
final String account = abstractContact.getAccount();
final String user = abstractContact.getUser();
menu.setHeaderTitle(abstractContact.getName());
menu.add(R.string.chat_viewer).setOnMenuItemClickListener(
new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
MessageManager.getInstance().openChat(account, user);
activity.startActivity(ChatViewer.createIntent(
activity, account, user));
return true;
}
});
if (MUCManager.getInstance().hasRoom(account, user)) {
if (!MUCManager.getInstance().inUse(account, user))
menu.add(R.string.muc_edit).setIntent(
......@@ -121,10 +110,6 @@ public class ContextMenuHelper {
});
} else {
menu.add(R.string.contact_viewer).setIntent(
ContactViewer.createIntent(activity, account, user));
menu.add(R.string.contact_editor).setIntent(
ContactEditor.createIntent(activity, account, user));
menu.add(R.string.contact_delete).setOnMenuItemClickListener(
new MenuItem.OnMenuItemClickListener() {
......@@ -290,7 +275,6 @@ public class ContextMenuHelper {
}
return true;
}
});
menu.add(R.string.contact_add).setIntent(
ContactAdd.createIntent(activity, account));
......
......@@ -17,12 +17,11 @@
android:visible="false"
/>
<item android:id="@+id/action_edit_contact"
android:title="@string/contact_editor"
<item android:id="@+id/action_view_contact"
android:title="@string/contact_viewer"
app:showAsAction="never"
android:orderInCategory="100"
android:visible="false"
android:icon="@drawable/ic_create_white_24dp"
/>
<item android:id="@+id/action_chat_list"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment