Skip to content

Commit c1a666e

Browse files
committed
CodeQA (again)
Halp, please make it the last
1 parent a0af4fe commit c1a666e

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

CollapseLauncher/Classes/CachesManagement/Honkai/Fetch.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,10 @@ private byte[] GetAssetIndexSalt(string data)
339339
private static bool IsValidRegionFile(string input, string lang)
340340
{
341341
// If the path contains regional string, then move to the next check
342-
if (input!.Contains(CacheRegionalCheckName!))
343-
{
344-
// Check if the regional string has specified language string
345-
return input.Contains($"{CacheRegionalCheckName}_{lang}");
346-
}
347-
342+
return !input.Contains(CacheRegionalCheckName!) ||
343+
// Check if the regional string has specified language string
344+
input.Contains($"{CacheRegionalCheckName}_{lang}");
348345
// If none, then pass it as true (non-regional string)
349-
return true;
350346
}
351347

352348
public KianaDispatch GetCurrentGateway() => GameGateway;

CollapseLauncher/Classes/EventsManagement/BackgroundActivityManager.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ public static void Detach(int hashID)
4141
if (BackgroundActivities.Remove(hashID))
4242
{
4343
DetachEventFromNotification(hashID);
44-
#if DEBUG
44+
#if DEBUG
4545
Logger.LogWriteLine($"Background activity with ID: {hashID} has been detached", LogType.Debug, true);
46-
#endif
46+
return;
47+
#endif
4748
}
4849

49-
#if DEBUG
50+
#if DEBUG
5051
Logger.LogWriteLine($"Cannot detach background activity with ID: {hashID} because it doesn't attached", LogType.Debug, true);
51-
#endif
52+
#endif
5253
}
5354

5455
private static void AttachEventToNotification(int hashID, IBackgroundActivity activity, string activityTitle, string activitySubtitle)

0 commit comments

Comments
 (0)