Skip to content

Commit

Permalink
Show warning only once
Browse files Browse the repository at this point in the history
  • Loading branch information
uholeschak committed Dec 30, 2024
1 parent c3a4204 commit 018c493
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions BmwDeepObd/JobReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ public int Compare(DisplayInfo x, DisplayInfo y)
private bool _manualEdit;
private bool _logTagsPresent;
private bool _compatIdsUsed;
private bool _compatIdWarningShown;
private string _sgbdFunctional = string.Empty;
private string _interfaceName = string.Empty;
private string _vehicleSeries = string.Empty;
Expand Down Expand Up @@ -384,6 +385,12 @@ public int Compare(DisplayInfo x, DisplayInfo y)

public bool CompatIdsUsed => _compatIdsUsed;

public bool CompatIdWarningShown
{
get => _compatIdWarningShown;
set => _compatIdWarningShown = value;
}

public string SgbdFunctional => _sgbdFunctional;

public string ManufacturerName => _manufacturerName;
Expand Down Expand Up @@ -455,6 +462,7 @@ private void Clear()
_logPath = string.Empty;
_logTagsPresent = false;
_compatIdsUsed = false;
_compatIdWarningShown = false;
_sgbdFunctional = string.Empty;
_manufacturerName = string.Empty;
_interfaceName = string.Empty;
Expand Down
6 changes: 5 additions & 1 deletion BmwDeepObd/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,11 @@ protected void ConnectAction(object sender, ConnectActionArgs connectActionArgs,

if (ActivityCommon.JobReader.CompatIdsUsed)
{
ShowBallonMessage(GetString(Resource.String.compile_compat_id_warn), ActivityCommon.BalloonDismissDuration, BalloonAlligment.Top);
if (!ActivityCommon.JobReader.CompatIdWarningShown)
{
ShowBallonMessage(GetString(Resource.String.compile_compat_id_warn), ActivityCommon.BalloonDismissDuration, BalloonAlligment.Top);
ActivityCommon.JobReader.CompatIdWarningShown = true;
}
}

if (!_instanceData.AdapterCheckOk && _activityCommon.AdapterCheckRequired)
Expand Down

0 comments on commit 018c493

Please sign in to comment.