Skip to content

Commit

Permalink
Show Address is Detected message only when it is a new address (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
akamud authored and AndreiMisiukevich committed Jun 13, 2019
1 parent db6a6f1 commit fdd28f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Observer/Xamarin.Forms.HotReload.Observer/FileObserver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using System.Text;
using System.Threading.Tasks;
using static System.Math;
using System.Net;
using System.Threading;

namespace Xamarin.Forms.HotReload.Observer
Expand Down Expand Up @@ -75,8 +74,11 @@ private static void Run()
var address = addressMsg.Split(';').FirstOrDefault();
if (address != null)
{
Console.WriteLine($"ADDRESS IS DETECTED: {address}");
_addresses.Add(address);
if (!_addresses.Contains(address))
{
Console.WriteLine($"ADDRESS IS DETECTED: {address}");
_addresses.Add(address);
}
}
};
receiver.StartAsync();
Expand Down

0 comments on commit fdd28f8

Please sign in to comment.