Fix issue #378 - Allow to pin & unpin messages

This commit is contained in:
Thomas 2022-10-29 16:28:27 +02:00
parent f94b568d0a
commit 345ed2afd6
2 changed files with 17 additions and 3 deletions

View file

@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="app.fedilab.android"> package="app.fedilab.android">
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission <uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:name="android.permission.WRITE_EXTERNAL_STORAGE"
@ -20,20 +21,28 @@
</intent> </intent>
</queries> </queries>
<application <application
android:name=".MainApplication" android:name="app.fedilab.android.MainApplication"
android:allowBackup="false" android:allowBackup="false"
android:configChanges="orientation|screenSize" android:configChanges="orientation|screenSize"
android:icon="@mipmap/ic_launcher_bubbles" android:icon="@mipmap/ic_launcher_bubbles"
android:label="@string/app_name" android:label="@string/app_name"
android:hardwareAccelerated="true"
android:roundIcon="@mipmap/ic_launcher_bubbles_round" android:roundIcon="@mipmap/ic_launcher_bubbles_round"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppThemeDark" android:theme="@style/AppThemeDark"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:replace="android:allowBackup"> tools:replace="android:allowBackup">
<activity <activity
android:name=".activities.MainActivity" android:name="app.fedilab.android.activities.MainActivity"
android:launchMode="singleTask"
android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize" android:configChanges="orientation|screenSize|keyboardHidden|screenLayout|smallestScreenSize"
android:exported="true"> android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter> <intent-filter>
<action android:name="android.intent.action.SEND" /> <action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
@ -57,7 +66,7 @@
<activity-alias <activity-alias
android:name=".activities.MainActivity.Bubbles" android:name=".activities.MainActivity.Bubbles"
android:enabled="true" android:enabled="false"
android:exported="true" android:exported="true"
android:icon="@mipmap/ic_launcher_bubbles" android:icon="@mipmap/ic_launcher_bubbles"
android:roundIcon="@mipmap/ic_launcher_bubbles_round" android:roundIcon="@mipmap/ic_launcher_bubbles_round"

View file

@ -106,6 +106,11 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen
} }
private void hideAllIcons(Context context) { private void hideAllIcons(Context context) {
context.getPackageManager().setComponentEnabledSetting(
new ComponentName(context.getPackageName(), "app.fedilab.android.activities.MainActivity"),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);
context.getPackageManager().setComponentEnabledSetting( context.getPackageManager().setComponentEnabledSetting(
new ComponentName(context.getPackageName(), "app.fedilab.android.activities.MainActivity.Bubbles"), new ComponentName(context.getPackageName(), "app.fedilab.android.activities.MainActivity.Bubbles"),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);