forked from Jorixon/JASM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Quick switch button added for switching between games (Jorixon#138
) chore: Redid Date Added sorting logic fix: Potential fix for crash when navigating to character after mod install feat: When navigating back from a character page to the character overview, it will now scroll that character into view
- Loading branch information
Showing
14 changed files
with
266 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
namespace GIMI_ModManager.Core.Helpers; | ||
|
||
public sealed class AsyncLock : IDisposable | ||
{ | ||
private readonly SemaphoreSlim _semaphore = new(1, 1); | ||
|
||
public async Task<LockReleaser> LockAsync(int timeout = -1, CancellationToken cancellationToken = default) | ||
{ | ||
await _semaphore.WaitAsync(timeout, cancellationToken).ConfigureAwait(false); | ||
return new LockReleaser(Release); | ||
} | ||
|
||
private void Release() => _semaphore.Release(); | ||
|
||
public void Dispose() => _semaphore.Dispose(); | ||
} | ||
|
||
public readonly struct LockReleaser : IDisposable | ||
{ | ||
private readonly Action _release; | ||
|
||
internal LockReleaser(Action release) | ||
{ | ||
_release = release; | ||
} | ||
|
||
public void Dispose() => _release(); | ||
public void Release() => _release(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.