Merge pull request #690 from yakov116/master

My first attempt to add an info dialog
This commit is contained in:
Kosh Sergani 2017-06-21 21:58:57 +08:00 committed by GitHub
commit 2460fbaefb
2 changed files with 11 additions and 1 deletions

View File

@ -75,7 +75,7 @@ We have configurated snapshots of FastHub, which can be downloaded from [AppVeyo
- _FastHub is actively developed. More features will come!_
~~> **FastHub** contain Ads, which are disabled by default. You could enable them if you'd like to support the development.~~
Adverts will not be available until the further notice.
_Ads currently not available._
# Specs / Open-source libraries:

View File

@ -8,10 +8,12 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.Fragment;
import android.support.v7.app.AlertDialog;
import android.view.MotionEvent;
import android.view.View;
import com.evernote.android.state.State;
import com.fastaccess.BuildConfig;
import com.fastaccess.R;
import com.fastaccess.data.dao.model.Issue;
import com.fastaccess.data.dao.model.PullRequest;
@ -213,6 +215,14 @@ public class CreateIssueActivity extends BaseActivity<CreateIssueMvp.View, Creat
}
}
if (isFeedback) setTitle(R.string.submit_feedback);
if (BuildConfig.DEBUG && isFeedback) {
new AlertDialog.Builder(this)
.setTitle("You are currently using a debug build")
.setMessage("If you have found a bug, please report it on slack." + "\n" +
"Feature requests can be submitted here." + "\n" + "Happy Testing")
.setPositiveButton(android.R.string.ok, null)
.show();
}
if (toolbar != null) toolbar.setSubtitle(login + "/" + repoId);
}