You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@taverna.apache.org by 300vikram <gi...@git.apache.org> on 2018/02/16 19:17:02 UTC

[GitHub] incubator-taverna-mobile pull request #55: Added alert dialog before signing...

GitHub user 300vikram opened a pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/55

    Added alert dialog before signing out from app

    In this PR, I made an alert dialog before signing out as an alert. Before it was just signing out without any alert.
    
    Please make sure these boxes are checked before submitting your pull request - thanks!
    
    - [x] Apply the `AndroidStyle.xml` style template to your code in Android Studio.
    
    - [x] Run the checks with `./gradlew check` to make sure you didn't break anything
    
    - [x] If you have multiple commits please combine them into one commit by squashing them.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/300vikram/incubator-taverna-mobile signOut

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-taverna-mobile/pull/55.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #55
    
----
commit 6f3d9195d37f690313c400b0906ebe3d82729f4f
Author: 300vikram <30...@...>
Date:   2018-02-16T18:50:05Z

    Added alert dialog before signing out from app

----


---

[GitHub] incubator-taverna-mobile pull request #55: Added alert dialog before signing...

Posted by sagar15795 <gi...@git.apache.org>.
Github user sagar15795 commented on a diff in the pull request:

    https://github.com/apache/incubator-taverna-mobile/pull/55#discussion_r168921942
  
    --- Diff: app/src/main/java/org/apache/taverna/mobile/ui/DashboardActivity.java ---
    @@ -253,6 +249,28 @@ public boolean onCreateOptionsMenu(Menu menu) {
             return true;
         }
     
    +    private void signOutConfirmation() {
    +        new AlertDialog.Builder(this)
    +                .setTitle(R.string.sign_out)
    +                .setMessage(R.string.sign_out_message)
    +                .setPositiveButton(R.string.sign_out, new DialogInterface.OnClickListener() {
    +
    +                    public void onClick(DialogInterface dialog, int whichButton) {
    +                        signOut();
    +                    }
    +                })
    +                .setNegativeButton(android.R.string.no, null).show();
    +    }
    +
    +    private void signOut() {
    +        mDrawerLayout.closeDrawers();
    +        dataManager.getPreferencesHelper().setLoggedInFlag(false);
    --- End diff --
    
    Also clear all shared preferences data and database data


---

[GitHub] incubator-taverna-mobile pull request #55: Added alert dialog before signing...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-taverna-mobile/pull/55


---