We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2c6da4 commit dfd2a15Copy full SHA for dfd2a15
1 file changed
Pocsag.Plugin/PocsagControl.cs
@@ -159,6 +159,19 @@ private void MessageReceived(Pocsag.PocsagMessage message)
159
int lastVisible = (firstDisplayed + displayed) - 1;
160
int lastIndex = this.dataGridView1.RowCount - 1;
161
162
+ if (message.Payload.Length < 50) return;
163
+
164
+ for (int i = 0; i < bindingList.Count; i++)
165
+ {
166
+ // Check to see if a random 10 characters exist in the messages currently stored in the list (another duplication protection)
167
+ if (bindingList[i].Payload.Contains(message.Payload.Substring(30, 10)))
168
169
+ // If it does, don't add it to our list.
170
+ return;
171
+ }
172
173
174
175
this.bindingList.Add(message);
176
177
// Create a datetime named file and record messages as they come in.
0 commit comments