X-Git-Url: https://git.ktnx.net/?p=mobile-ledger.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fnet%2Fktnx%2Fmobileledger%2Fui%2Factivity%2FMainActivity.java;h=641d296c2d502c28ec81e0de4f71b215031d56a7;hp=fb8a732748a5a4bfc63246df8aa5dd2eb520386e;hb=b4d5812942fdb2ca89c9f048e539c4c65a8994cf;hpb=0e2937f7e472c52675d47ff7a5dcb214adbeb35d diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index fb8a7327..641d296c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -1,18 +1,18 @@ /* * Copyright © 2019 Damyan Ivanov. - * This file is part of Mobile-Ledger. - * Mobile-Ledger is free software: you can distribute it and/or modify it + * This file is part of MoLe. + * MoLe is free software: you can distribute it and/or modify it * under the term of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your opinion), any later version. * - * Mobile-Ledger is distributed in the hope that it will be useful, + * MoLe is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License terms for details. * * You should have received a copy of the GNU General Public License - * along with Mobile-Ledger. If not, see . + * along with MoLe. If not, see . */ package net.ktnx.mobileledger.ui.activity; @@ -30,7 +30,6 @@ import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewPager; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.util.Log; import android.view.View; @@ -53,7 +52,7 @@ import java.lang.ref.WeakReference; import java.text.DateFormat; import java.util.Date; -public class MainActivity extends AppCompatActivity { +public class MainActivity extends CrashReportingActivity { DrawerLayout drawer; private FragmentManager fragmentManager; private TextView tvLastUpdate; @@ -396,6 +395,6 @@ public class MainActivity extends AppCompatActivity { } public void fabShouldShow() { MobileLedgerProfile profile = Data.profile.get(); - if (profile.isPostingPermitted()) fab.show(); + if ((profile != null) && profile.isPostingPermitted()) fab.show(); } }