added moderation button to polycentric screen and sliders for moderation

This commit is contained in:
Trevor 2025-04-21 14:37:27 -05:00
parent e1cb3308df
commit 49367c6c75
3 changed files with 22 additions and 9 deletions

View File

@ -375,8 +375,19 @@ class StateApp {
_cacheDirectory?.let { ApiMethods.initCache(it) }; _cacheDirectory?.let { ApiMethods.initCache(it) };
} }
Logger.i(TAG, "MainApp Starting: Initializing [ModerationsManager]");
ModerationsManager.initialize(context); ModerationsManager.initialize(context);
Logger.i(TAG, "MainApp Starting: Setting [ModerationLevelProvider]");
ApiMethods.setModerationLevelProvider {
try {
ModerationsManager.getInstance().getCurrentModerationLevels()
} catch (e: IllegalStateException) {
// Handle case where manager might not be ready, though it should be here
null
}
}
val logFile = File(context.filesDir, "log.txt"); val logFile = File(context.filesDir, "log.txt");
if (Settings.instance.logging.logLevel > LogLevel.NONE.value) { if (Settings.instance.logging.logLevel > LogLevel.NONE.value) {
val fileLogConsumer = FileLogConsumer(logFile, LogLevel.fromInt(Settings.instance.logging.logLevel), false); val fileLogConsumer = FileLogConsumer(logFile, LogLevel.fromInt(Settings.instance.logging.logLevel), false);

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/colorBackground" android:background="@color/black"
android:padding="16dp"> android:padding="16dp">
<LinearLayout <LinearLayout
@ -22,7 +22,7 @@
android:contentDescription="@string/back" android:contentDescription="@string/back"
android:padding="12dp" android:padding="12dp"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="@drawable/ic_arrow_back" /> app:srcCompat="@drawable/ic_back_thin_white_16dp" />
<TextView <TextView
android:layout_width="0dp" android:layout_width="0dp"

View File

@ -141,6 +141,15 @@
app:buttonIcon="@drawable/ic_export" app:buttonIcon="@drawable/ic_export"
android:layout_marginTop="8dp" /> android:layout_marginTop="8dp" />
<com.futo.platformplayer.views.buttons.BigButton
android:id="@+id/button_moderation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:buttonSubText="Set moderation settings for polycentric comments"
android:layout_marginTop="8dp"
app:buttonIcon="@drawable/ic_settings"
app:buttonText="Moderation Settings" />
<com.futo.platformplayer.views.buttons.BigButton <com.futo.platformplayer.views.buttons.BigButton
android:id="@+id/button_export" android:id="@+id/button_export"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -169,13 +178,6 @@
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
app:buttonBackground="@drawable/background_big_button_red"/> app:buttonBackground="@drawable/background_big_button_red"/>
<com.futo.platformplayer.views.buttons.BigButton
android:id="@+id/button_moderation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
app:buttonIcon="@drawable/ic_settings"
app:buttonText="Moderation Settings" />
</LinearLayout> </LinearLayout>
<com.futo.platformplayer.views.overlays.LoaderOverlay <com.futo.platformplayer.views.overlays.LoaderOverlay