1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 21:52:56 +08:00

Merge pull request #3244 from peppy/log-display-fix

Fix notifications suggesting automatic reporting in non-deployed builds
This commit is contained in:
Dean Herbert 2018-08-17 14:27:56 +09:00 committed by GitHub
commit d0ffab6987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -7,6 +7,7 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using osu.Framework;
using osu.Framework.Development;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game.IPC;
@ -51,7 +52,7 @@ namespace osu.Desktop
}
}
private static int allowableExceptions = 1;
private static int allowableExceptions = DebugUtils.IsDebugBuild ? 0 : 1;
/// <summary>
/// Allow a maximum of one unhandled exception, per second of execution.

View File

@ -463,7 +463,7 @@ namespace osu.Game
Schedule(() => notifications.Post(new SimpleNotification
{
Icon = entry.Level == LogLevel.Important ? FontAwesome.fa_exclamation_circle : FontAwesome.fa_bomb,
Text = entry.Message + (entry.Exception != null ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
Text = entry.Message + (entry.Exception != null && IsDeployedBuild ? "\n\nThis error has been automatically reported to the devs." : string.Empty),
}));
}
else if (recentLogCount == short_term_display_limit)