OSDN Git Service

Refactoring RAD-498 for consistency 20/head
authornooperation <madbrahmin@gmail.com>
Sat, 18 Jul 2015 04:37:47 +0000 (00:37 -0400)
committernooperation <madbrahmin@gmail.com>
Sat, 18 Jul 2015 04:37:47 +0000 (00:37 -0400)
Radegast/GUI/Consoles/GroupIMTabWindow.cs

index b757712..95f5f28 100644 (file)
@@ -457,23 +457,6 @@ namespace Radegast
             pnlChatInput.Height = cbxInput.Height + 7;
         }
 
-        private void ctxMute_Click(object sender, EventArgs e)
-        {
-            if (Participants.SelectedItems.Count != 1) return;
-
-            var agentID = (UUID)Participants.SelectedItems[0].Tag;
-            if (agentID == client.Self.AgentID) return;
-
-            if (ctxMute.Text == "Mute")
-            {
-                client.Self.UpdateMuteListEntry(MuteType.Resident, agentID, instance.Names.GetLegacyName(agentID));
-            }
-            else
-            {
-                client.Self.RemoveMuteListEntry(agentID, instance.Names.GetLegacyName(agentID));
-            }
-        }
-
         private void avatarContext_Opening(object sender, System.ComponentModel.CancelEventArgs e)
         {
             if (Participants.SelectedItems.Count != 1)
@@ -550,5 +533,21 @@ namespace Radegast
             if (Participants.SelectedItems.Count != 1) return;
             UUID av = (UUID)Participants.SelectedItems[0].Tag;
         }
+
+        private void ctxMute_Click(object sender, EventArgs e)
+        {
+            if (Participants.SelectedItems.Count != 1) return;
+            UUID av = (UUID)Participants.SelectedItems[0].Tag;
+            if (av == client.Self.AgentID) return;
+
+            if (ctxMute.Text == "Mute")
+            {
+                client.Self.UpdateMuteListEntry(MuteType.Resident, av, instance.Names.GetLegacyName(av));
+            }
+            else
+            {
+                client.Self.RemoveMuteListEntry(av, instance.Names.GetLegacyName(av));
+            }
+        }
     }
 }