fixes issue where character hash of paused users in a syncshell was uselessly sent
This commit is contained in:
@@ -3,5 +3,7 @@
|
||||
public record PauseState
|
||||
{
|
||||
public string GID { get; set; }
|
||||
public bool IsPaused { get; set; }
|
||||
public bool IsPaused => IsSelfPaused || IsOtherPaused;
|
||||
public bool IsSelfPaused { get; set; }
|
||||
public bool IsOtherPaused { get; set; }
|
||||
}
|
||||
@@ -37,6 +37,13 @@ public record PausedEntry
|
||||
}
|
||||
}
|
||||
|
||||
public PauseInfo IsOtherPausedForSpecificGroup(string gid)
|
||||
{
|
||||
var state = PauseStatesWithoutDirect.SingleOrDefault(g => string.Equals(g.GID, gid, StringComparison.Ordinal));
|
||||
if (state == null) return PauseInfo.NoConnection;
|
||||
return state.IsOtherPaused ? PauseInfo.Paused : PauseInfo.Unpaused;
|
||||
}
|
||||
|
||||
public PauseInfo IsPausedForSpecificGroup(string gid)
|
||||
{
|
||||
var state = PauseStatesWithoutDirect.SingleOrDefault(g => string.Equals(g.GID, gid, StringComparison.Ordinal));
|
||||
|
||||
Reference in New Issue
Block a user