diff --git a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java index e72930d4..a978f424 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/activities/main/MainActivity.java @@ -5,8 +5,6 @@ import android.content.SharedPreferences; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.view.View; -import android.widget.ImageView; import android.widget.Toast; import androidx.appcompat.app.AppCompatDelegate; @@ -52,10 +50,8 @@ import static gr.thmmy.mthmmy.activities.topic.TopicActivity.BUNDLE_TOPIC_URL; public class MainActivity extends BaseActivity implements RecentFragment.RecentFragmentInteractionListener, ForumFragment.ForumFragmentInteractionListener, UnreadFragment.UnreadFragmentInteractionListener { //-----------------------------------------CLASS VARIABLES------------------------------------------ - private static final int TIME_INTERVAL = 2000; private SharedPreferences sharedPrefs; private static final String DRAWER_INTRO = "DRAWER_INTRO"; - private long mBackPressed; private SectionsPagerAdapter sectionsPagerAdapter; private ViewPager viewPager; private TabLayout tabLayout; @@ -138,17 +134,9 @@ public class MainActivity extends BaseActivity implements RecentFragment.RecentF @Override public void onBackPressed() { - if (drawer.isDrawerOpen()) { + if (drawer.isDrawerOpen()) drawer.closeDrawer(); - return; - } else if (mBackPressed + TIME_INTERVAL > System.currentTimeMillis()) { - super.onBackPressed(); - return; - } else { - Toast.makeText(BaseApplication.getInstance().getApplicationContext(), "Press back again to exit!" - , Toast.LENGTH_SHORT).show(); - } - mBackPressed = System.currentTimeMillis(); + super.onBackPressed(); } @Override diff --git a/build.gradle b/build.gradle index a861f527..f3f7c2fb 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { maven { url "https://jitpack.io" } } dependencies { - classpath 'com.android.tools.build:gradle:4.0.1' + classpath 'com.android.tools.build:gradle:4.1.1' classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0' classpath 'org.ajoberstar.grgit:grgit-core:3.1.1' // Also change in app/gradle/grgit.gradle diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 0e03b907..c2cb1bb4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Jul 20 13:59:13 EEST 2020 +#Wed Nov 11 12:38:13 EET 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip