Slight Readability Improvement
This commit is contained in:
1 parent
f1e5e5fb86
commit
cf316dc2d3
1 file changed
+4
-4
@@ -61,10 +61,10 @@ namespace CalamityMod.Utilities
|
||||
_FSW = new();
|
||||
_FSW.Changed += (o, arg) =>
|
||||
{
|
||||
if (DateTime.Now - _LastChangedEventDateTime < ChangedEventCooldown)
|
||||
if ((DateTime.Now - _LastChangedEventDateTime) < ChangedEventCooldown)
|
||||
return;
|
||||
|
||||
if (!(FileNameFilter?.IsMatch(System.IO.Path.GetFileName(arg.Name)) ?? true))
|
||||
if (FileNameFilter != null && !FileNameFilter.IsMatch(System.IO.Path.GetFileName(arg.Name)))
|
||||
return;
|
||||
|
||||
Main.QueueMainThreadAction(() => Changed?.Invoke(o, arg));
|
||||
@@ -73,10 +73,10 @@ namespace CalamityMod.Utilities
|
||||
|
||||
_FSW.Renamed += (o, arg) =>
|
||||
{
|
||||
if (DateTime.Now - _LastRenamedEventDateTime < RenamedEventCooldown)
|
||||
if ((DateTime.Now - _LastRenamedEventDateTime) < RenamedEventCooldown)
|
||||
return;
|
||||
|
||||
if (!(FileNameFilter?.IsMatch(System.IO.Path.GetFileName(arg.Name)) ?? true))
|
||||
if (FileNameFilter != null && !FileNameFilter.IsMatch(System.IO.Path.GetFileName(arg.Name)))
|
||||
return;
|
||||
|
||||
Main.QueueMainThreadAction(() => Renamed?.Invoke(o, arg));
|
||||
|
||||
Reference in new issue
Block a user