mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-03 17:02:13 +01:00
Bangle.js build: remove the 'Donate' link for the Bangle.js build only, and instead add a message in the app's About dialog (unfortunately this is needed because Google Play store policy doesn't allow you to 'buy' stuff outside of the store)
This commit is contained in:
parent
e40bd79fbf
commit
3ef39433a6
@ -41,6 +41,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.ActionBarDrawerToggle;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.appcompat.view.menu.MenuItemImpl;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
@ -167,6 +168,13 @@ public class ControlCenterv2 extends AppCompatActivity
|
||||
drawer.setDrawerListener(toggle);
|
||||
toggle.syncState();
|
||||
|
||||
/* This sucks but for the play store we're not allowed a donation link. Instead for
|
||||
the Bangle.js Play Store app we put a message in the About dialog via @string/about_description */
|
||||
if (BuildConfig.FLAVOR == "banglejs") {
|
||||
MenuItemImpl v = (MenuItemImpl) ((NavigationView) drawer.getChildAt(1)).getMenu().findItem(R.id.donation_link);
|
||||
if (v != null) v.setVisible(false);
|
||||
}
|
||||
|
||||
NavigationView navigationView = findViewById(R.id.nav_view);
|
||||
navigationView.setNavigationItemSelectedListener(this);
|
||||
|
||||
|
@ -9,13 +9,13 @@
|
||||
<string name="application_name_banglejs_main">Bangle.js Gadgetbridge</string>
|
||||
<string name="title_activity_controlcenter_banglejs_main">Bangle.js Gadgetbridge</string>
|
||||
<string name="about_activity_title_banglejs_main">About Bangle.js Gadgetbridge</string>
|
||||
<string name="about_description_banglejs_main">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.</string>
|
||||
<string name="about_description_banglejs_main">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.\n\nDue to Google Play Store policies, we are not allowed a donation link in the app itself, but if you like this app please consider donating via the Gadgetbridge homepage below.</string>
|
||||
<string name="gadgetbridge_running_banglejs_main">Bangle.js running</string>
|
||||
|
||||
<string name="application_name_banglejs_nopebble">Bangle.js Gadgetbridge</string>
|
||||
<string name="title_activity_controlcenter_banglejs_nopebble">Bangle.js Gadgetbridge</string>
|
||||
<string name="about_activity_title_banglejs_nopebble">About Bangle.js Gadgetbridge</string>
|
||||
<string name="about_description_banglejs_nopebble">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.</string>
|
||||
<string name="about_description_banglejs_nopebble">Android companion app for Bangle.js built on top of the Gadgetbridge project, with added Internet Access.\n\nDue to Google Play Store policies, we are not allowed a donation link in the app itself, but if you like this app please consider donating via the Gadgetbridge homepage below.</string>
|
||||
<string name="gadgetbridge_running_banglejs_nopebble">Bangle.js running</string>
|
||||
|
||||
<string name="application_name_main_nightly">Gadgetbridge (Nightly)</string>
|
||||
|
Loading…
Reference in New Issue
Block a user