Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
xabber-android
Commits
754348a0
Commit
754348a0
authored
Apr 08, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contact context menu returned: chat, contact info, edit groups.
parent
abb786a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
ContextMenuHelper.java
.../java/com/xabber/android/ui/helper/ContextMenuHelper.java
+18
-0
No files found.
app/src/main/java/com/xabber/android/ui/helper/ContextMenuHelper.java
View file @
754348a0
...
...
@@ -36,6 +36,7 @@ import com.xabber.android.data.roster.AbstractContact;
import
com.xabber.android.data.roster.GroupManager
;
import
com.xabber.android.data.roster.PresenceManager
;
import
com.xabber.android.data.roster.ShowOfflineMode
;
import
com.xabber.android.ui.ChatViewer
;
import
com.xabber.android.ui.ContactAdd
;
import
com.xabber.android.ui.ContactViewer
;
import
com.xabber.android.ui.GroupEditor
;
...
...
@@ -64,6 +65,18 @@ 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
(
...
...
@@ -107,6 +120,11 @@ public class ContextMenuHelper {
});
}
else
{
menu
.
add
(
R
.
string
.
contact_viewer
).
setIntent
(
ContactViewer
.
createIntent
(
activity
,
account
,
user
));
menu
.
add
(
R
.
string
.
edit_contact_groups
).
setIntent
(
GroupEditor
.
createIntent
(
activity
,
account
,
user
));
menu
.
add
(
R
.
string
.
contact_delete
).
setOnMenuItemClickListener
(
new
MenuItem
.
OnMenuItemClickListener
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment