Skip to content
This repository has been archived by the owner on Apr 12, 2023. It is now read-only.

Debug_Mock での StopAsyncの bug-fix #167

Closed
i-maruyama opened this issue May 13, 2021 · 3 comments · Fixed by #362
Closed

Debug_Mock での StopAsyncの bug-fix #167

i-maruyama opened this issue May 13, 2021 · 3 comments · Fixed by #362
Labels
bug バグ。本来あるべき動作をしていないもの

Comments

@i-maruyama
Copy link
Contributor

その機能リクエストは何らかの問題に関連しますか / Is your feature request related to a problem?

Debug_Mock ビルドで EN の停止が正常に機能していません。

解決策についてお書きください / Describe the solution you'd like

public async Task StopAsync()
{
await WaitRandom();
Preferences.Set("fake_enabled", true);

を true から false に変更しバグをなくす。

あなたが考える代替案についてご説明ください / Describe alternatives you've considered

放置することも1案です。 EN の停止は唯一「アプリの使用停止」で使われるだけで、しかも上記バグは Debug_Mock ビルドにしか影響していません。

その他 / Additional context

できれば放置せず、バグを潰しておいていただけると、 DebugPage (#160) を作りやすいです。

念の為、 Debug_Mock の Covid19Radar.UnitTests は改変前と改変後で実施して変わらない(エラー2箇所が同じ場所)事は確認しています。

@i-maruyama
Copy link
Contributor Author

一行変えただけですがPRを作ってみました。

詳しく説明すると、StartAsync では trueにして、 StopAsync では false にするはずが、両方 true になっています。

public async Task StartAsync()
{
await WaitRandom();
Preferences.Set("fake_enabled", true);
}
public async Task StopAsync()
{
await WaitRandom();
Preferences.Set("fake_enabled", true);
}

正しく false に直すことで、以下の IsEnableAsync と対応させることができます。

public async Task<bool> IsEnabledAsync()
{
await WaitRandom();
return Preferences.Get("fake_enabled", true);
}

@keiji keiji added the bug バグ。本来あるべき動作をしていないもの label May 13, 2021
@i-maruyama
Copy link
Contributor Author

#191 に取り込まれたため、 close します。

@keiji
Copy link
Collaborator

keiji commented Jul 13, 2021

#191 の取り込み先がfeature branchなので、こちらのIssueは一旦reopenします。
現象自体はfearureブランチで修正されているので、developに取り込まれればcloseということで。

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug バグ。本来あるべき動作をしていないもの
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants