mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e5ddbacb2e | |||
| 03c7d78e2b | |||
| 00498b02b3 | |||
| ad6e2d1a9f | |||
| 5cfa71cd72 | |||
| 0551044ef9 | |||
| 5126b3eeb2 | |||
| cc419a9f62 | |||
| 2469b6efef | |||
| 92bc53b672 |
+2
-2
@@ -33,8 +33,8 @@ android {
|
||||
useLibrary 'org.apache.http.legacy'
|
||||
|
||||
defaultConfig {
|
||||
versionCode 30000696
|
||||
versionName "1.48.5"
|
||||
versionCode 30000697
|
||||
versionName "1.48.6"
|
||||
|
||||
applicationId "chat.delta.lite"
|
||||
multiDexEnabled true
|
||||
|
||||
@@ -72,7 +72,6 @@ import org.thoughtcrime.securesms.util.Linkifier;
|
||||
import org.thoughtcrime.securesms.util.LongClickMovementMethod;
|
||||
import org.thoughtcrime.securesms.util.MarkdownUtil;
|
||||
import org.thoughtcrime.securesms.util.MediaUtil;
|
||||
import org.thoughtcrime.securesms.util.Prefs;
|
||||
import org.thoughtcrime.securesms.util.Util;
|
||||
import org.thoughtcrime.securesms.util.ViewUtil;
|
||||
import org.thoughtcrime.securesms.util.views.Stub;
|
||||
@@ -387,7 +386,6 @@ public class ConversationItem extends BaseConversationItem
|
||||
private void setBodyText(DcMsg messageRecord) {
|
||||
bodyText.setClickable(false);
|
||||
bodyText.setFocusable(false);
|
||||
bodyText.setTextSize(TypedValue.COMPLEX_UNIT_SP, Prefs.getMessageBodyTextSize(context));
|
||||
|
||||
String text = messageRecord.getText();
|
||||
|
||||
|
||||
+28
-5
File diff suppressed because one or more lines are too long
@@ -23,8 +23,6 @@ public class AppearancePreferenceFragment extends ListSummaryPreferenceFragment
|
||||
this.findPreference(Prefs.THEME_PREF).setOnPreferenceChangeListener(new ListSummaryListener());
|
||||
initializeListSummary((ListPreference)findPreference(Prefs.THEME_PREF));
|
||||
this.findPreference(Prefs.BACKGROUND_PREF).setOnPreferenceClickListener(new BackgroundClickListener());
|
||||
this.findPreference(Prefs.MESSAGE_BODY_TEXT_SIZE_PREF).setOnPreferenceChangeListener(new ListSummaryListener());
|
||||
initializeListSummary((ListPreference) findPreference(Prefs.MESSAGE_BODY_TEXT_SIZE_PREF));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,6 @@ public class Prefs {
|
||||
public static final String DOZE_ASKED_DIRECTLY = "pref_doze_asked_directly";
|
||||
public static final String ASKED_FOR_NOTIFICATION_PERMISSION= "pref_asked_for_notification_permission";
|
||||
private static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
|
||||
public static final String MESSAGE_BODY_TEXT_SIZE_PREF = "pref_message_body_text_size";
|
||||
|
||||
public static final String NOTIFICATION_PRIVACY_PREF = "pref_notification_privacy";
|
||||
public static final String NOTIFICATION_PRIORITY_PREF = "pref_notification_priority";
|
||||
@@ -104,10 +103,6 @@ public class Prefs {
|
||||
return Integer.valueOf(getStringPreference(context, NOTIFICATION_PRIORITY_PREF, String.valueOf(NotificationCompat.PRIORITY_HIGH)));
|
||||
}
|
||||
|
||||
public static int getMessageBodyTextSize(Context context) {
|
||||
return Integer.valueOf(getStringPreference(context, MESSAGE_BODY_TEXT_SIZE_PREF, "16"));
|
||||
}
|
||||
|
||||
public static void setDirectCaptureCameraId(Context context, int value) {
|
||||
setIntegerPreference(context, DIRECT_CAPTURE_CAMERA_ID, value);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,9 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.interpolator.view.animation.FastOutSlowInInterpolator;
|
||||
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.Gravity;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -202,6 +204,18 @@ public class ViewUtil {
|
||||
return (int)((dp * context.getResources().getDisplayMetrics().density) + 0.5);
|
||||
}
|
||||
|
||||
public static float pxToSp(Context context, int px) {
|
||||
DisplayMetrics metrics = context.getResources().getDisplayMetrics();
|
||||
if (VERSION.SDK_INT >= VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
return TypedValue.deriveDimension(TypedValue.COMPLEX_UNIT_SP, px, metrics);
|
||||
} else {
|
||||
if (metrics.scaledDensity == 0) {
|
||||
return 0;
|
||||
}
|
||||
return px / metrics.scaledDensity;
|
||||
}
|
||||
}
|
||||
|
||||
public static void updateLayoutParams(@NonNull View view, int width, int height) {
|
||||
view.getLayoutParams().width = width;
|
||||
view.getLayoutParams().height = height;
|
||||
|
||||
@@ -38,6 +38,22 @@
|
||||
android:gravity="center_vertical"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/protocol"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:paddingStart="5dp"
|
||||
android:paddingEnd="5dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/conversation_list_item_date_color"
|
||||
android:background="@drawable/archived_indicator_background"
|
||||
style="@style/Signal.Text.Caption"
|
||||
tools:text="socks5"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/checkmark"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -53,7 +69,6 @@
|
||||
android:id="@+id/status"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:singleLine="true"
|
||||
android:ellipsize="marquee"
|
||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||
@@ -62,21 +77,6 @@
|
||||
tools:text="@string/connectivity_connected"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/protocol"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingRight="5dp"
|
||||
android:paddingTop="1dp"
|
||||
android:paddingBottom="1dp"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="?attr/conversation_list_item_date_color"
|
||||
android:background="@drawable/archived_indicator_background"
|
||||
style="@style/Signal.Text.Caption"
|
||||
tools:text="socks5"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageButton
|
||||
|
||||
@@ -188,20 +188,6 @@
|
||||
<item>#000000</item>
|
||||
</array>
|
||||
|
||||
<string-array name="pref_message_font_size_entries">
|
||||
<item>@string/small</item>
|
||||
<item>@string/normal</item>
|
||||
<item>@string/large</item>
|
||||
<item>@string/extra_large</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_message_font_size_values">
|
||||
<item>13</item>
|
||||
<item>16</item>
|
||||
<item>20</item>
|
||||
<item>30</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="pref_notification_priority_entries">
|
||||
<item>@string/def</item>
|
||||
<item>@string/notify_priority_high</item>
|
||||
|
||||
@@ -756,6 +756,7 @@
|
||||
<string name="pref_app_access">App Access</string>
|
||||
<string name="pref_chats">Chats</string>
|
||||
<string name="pref_in_chat_sounds">In-Chat Sounds</string>
|
||||
<!-- deprecated -->
|
||||
<string name="pref_message_text_size">Message Font Size</string>
|
||||
<string name="pref_view_log">View Log</string>
|
||||
<string name="pref_saved_log">Saved the log to \"Downloads\" folder</string>
|
||||
|
||||
@@ -15,11 +15,4 @@
|
||||
android:key="pref_chat_background"
|
||||
android:title="@string/pref_background"/>
|
||||
|
||||
<ListPreference
|
||||
android:key="pref_message_body_text_size"
|
||||
android:title="@string/pref_message_text_size"
|
||||
android:entries="@array/pref_message_font_size_entries"
|
||||
android:entryValues="@array/pref_message_font_size_values"
|
||||
android:defaultValue="16"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
@@ -15,11 +15,4 @@
|
||||
android:key="pref_chat_background"
|
||||
android:title="@string/pref_background"/>
|
||||
|
||||
<ListPreference
|
||||
android:key="pref_message_body_text_size"
|
||||
android:title="@string/pref_message_text_size"
|
||||
android:entries="@array/pref_message_font_size_entries"
|
||||
android:entryValues="@array/pref_message_font_size_values"
|
||||
android:defaultValue="16"/>
|
||||
|
||||
</PreferenceScreen>
|
||||
|
||||
Reference in New Issue
Block a user