Skip to content

Commit

Permalink
fix stuff 2
Browse files Browse the repository at this point in the history
  • Loading branch information
bdach committed Dec 13, 2024
1 parent 7ab2d50 commit c1fac81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion osu.Game/Screens/Edit/Submission/BeatmapSubmissionScreen.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
Expand Down Expand Up @@ -317,7 +318,7 @@ private void replaceBeatmapSet()
Logger.Log($"Beatmap submission failed on upload: {ex}");
backButton.Enabled.Value = true;
}; // TODO: probably show error
uploadRequest.Progressed += (current, total) => uploadStep.Progress.Value = (float)current / total;
uploadRequest.Progressed += (current, total) => uploadStep.Progress.Value = (float)current / Math.Max(total, 1);

api.Queue(uploadRequest);
uploadStep.Status.Value = SubmissionStageProgress.StageStatusType.InProgress;
Expand Down

0 comments on commit c1fac81

Please sign in to comment.