Skip to content

Commit

Permalink
Fix the issue where the status text get stuck at "synchronizing x/x" …
Browse files Browse the repository at this point in the history
…when someone joins while the sync is running
  • Loading branch information
jacklul committed May 13, 2022
1 parent 439efa4 commit dbc63b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,8 @@ public void SetStatusText(string text)

public void SaveStatusText()
{
_savedStatus = GetStatusText();
if (_savedStatus == "")
_savedStatus = GetStatusText();
}

public string GetStatusText()
Expand Down
2 changes: 2 additions & 0 deletions Assets/USharpVideoSubtitles/Scripts/SubtitleManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,8 @@ public override void OnPlayerLeft(VRCPlayerApi player)
{
foreach (SubtitleControlHandler handler in _registeredControlHandlers) // This will prevent the status being stuck at "synchronizing last chunk"
{
handler.RestoreStatusText();

if (_data != "")
handler.SetStatusText(MESSAGE_LOADED);
else
Expand Down

0 comments on commit dbc63b2

Please sign in to comment.