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

View file

@ -106,6 +106,11 @@ public class FragmentInterfaceSettings extends PreferenceFragmentCompat implemen
}
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(
new ComponentName(context.getPackageName(), "app.fedilab.android.activities.MainActivity.Bubbles"),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);