summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorThomas <tschneider.ac@gmail.com>2023-01-01 18:20:18 +0100
committerThomas <tschneider.ac@gmail.com>2023-01-01 18:20:18 +0100
commit61798a7ce13d46e9346c545799a27c4a9ff6214b (patch)
treef08b5511ed4e6551855f7147d9277fc4248cf2e2 /app
parent7303e7faa8258ae49f3ce1e384b5817537ef16ed (diff)
Release 3.13.4
Diffstat (limited to 'app')
-rw-r--r--app/src/main/assets/release_notes/notes.json5
-rw-r--r--app/src/main/java/app/fedilab/android/activities/ProfileActivity.java6
-rw-r--r--app/src/main/java/app/fedilab/android/helper/Helper.java12
-rw-r--r--app/src/main/res/values/strings.xml4
-rw-r--r--app/src/main/res/xml/pref_interface.xml8
5 files changed, 27 insertions, 8 deletions
diff --git a/app/src/main/assets/release_notes/notes.json b/app/src/main/assets/release_notes/notes.json
index 24c9070a8..6d5afedbc 100644
--- a/app/src/main/assets/release_notes/notes.json
+++ b/app/src/main/assets/release_notes/notes.json
@@ -1,5 +1,10 @@
[
{
+ "version": "3.13.4",
+ "code": "458",
+ "note": "Added:\n- Add Bubble timeline support in extra-features with filters\n- Allow to display public profiles by default to get all messages (Settings > Interface)\n\nChanged:\n- Full rework on links in messages (also mentions and tags)\n\nFixed:\n- Spoiler text when editing\n- Fix watermarks"
+ },
+ {
"version": "3.13.3",
"code": "457",
"note": "Added:\n- Allow to enable extra features in Settings\n- Customizable settings for extra features\n- Support quotes, reactions with messages\n- Support text format (html, markdown, etc.) when composing\n\nFixed:\n- CW not working with media\n- Media not displayed for older instances\n- Some crashes\n"
diff --git a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java
index 1edb53858..1ab57d6d8 100644
--- a/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java
+++ b/app/src/main/java/app/fedilab/android/activities/ProfileActivity.java
@@ -144,6 +144,7 @@ public class ProfileActivity extends BaseActivity {
Bundle b = getIntent().getExtras();
binding.accountFollow.setEnabled(false);
checkRemotely = false;
+ SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(this);
homeMuted = false;
if (b != null) {
account = (Account) b.getSerializable(Helper.ARG_ACCOUNT);
@@ -151,6 +152,9 @@ public class ProfileActivity extends BaseActivity {
mention_str = b.getString(Helper.ARG_MENTION, null);
checkRemotely = b.getBoolean(Helper.ARG_CHECK_REMOTELY, false);
}
+ if (!checkRemotely) {
+ checkRemotely = sharedpreferences.getBoolean(getString(R.string.SET_PROFILE_REMOTELY), false);
+ }
ActivityCompat.postponeEnterTransition(ProfileActivity.this);
//Remove title
if (actionBar != null) {
@@ -161,7 +165,7 @@ public class ProfileActivity extends BaseActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setDisplayShowHomeEnabled(true);
}
- SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(this);
+
float scale = sharedpreferences.getFloat(getString(R.string.SET_FONT_SCALE), 1.1f);
binding.title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 18 * 1.1f / scale);
accountsVM = new ViewModelProvider(ProfileActivity.this).get(AccountsVM.class);
diff --git a/app/src/main/java/app/fedilab/android/helper/Helper.java b/app/src/main/java/app/fedilab/android/helper/Helper.java
index f8c588199..310edb0d4 100644
--- a/app/src/main/java/app/fedilab/android/helper/Helper.java
+++ b/app/src/main/java/app/fedilab/android/helper/Helper.java
@@ -1173,19 +1173,17 @@ public class Helper {
File files = new File(attachment.local_path);
float textSize = 15;
Paint paint = new Paint();
- float textWidht = paint.measureText(waterMark);
- float width = Helper.convertDpToPixel(textWidht, context);
+ float width = paint.measureText(waterMark, 0, waterMark.length());
try {
BitmapFactory.Options options = new BitmapFactory.Options();
Bitmap backgroundBitmap = BitmapFactory.decodeFile(files.getAbsolutePath(), options);
-
- int w = options.outWidth;
- int h = options.outHeight;
- float valx = (float) 1.0 - width / (float) w;
+ int w = backgroundBitmap.getWidth();
+ int h = backgroundBitmap.getHeight();
+ float valx = (float) 1.0 - ((Helper.convertDpToPixel(width, context) + 10)) / (float) w;
if (valx < 0)
valx = 0;
- float valy = (h - Helper.convertDpToPixel(textSize, context) - 10) / (float) h;
+ float valy = (h - Helper.convertDpToPixel(textSize, context) - 0) / (float) h;
WatermarkText watermarkText = new WatermarkText(waterMark)
.setPositionX(valx)
.setPositionY(valy)
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index dec946dd3..8f1e603a3 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -1445,6 +1445,8 @@
<string name="SET_NOTIF_VALIDATION_FAV" translatable="false">SET_NOTIF_VALIDATION_FAV</string>
<string name="SET_DISPLAY_COUNTER_FAV_BOOST" translatable="false">SET_DISPLAY_COUNTER_FAV_BOOST</string>
<string name="SET_REMOVE_LEFT_MARGIN" translatable="false">SET_REMOVE_LEFT_MARGIN</string>
+
+ <string name="SET_PROFILE_REMOTELY" translatable="false">SET_PROFILE_REMOTELY</string>
<string name="SET_EXTAND_EXTRA_FEATURES" translatable="false">SET_EXTAND_EXTRA_FEATURES</string>
<string name="SET_INNER_MARKER" translatable="false">SET_INNER_MARKER</string>
@@ -2182,4 +2184,6 @@
<string name="v_list">List</string>
<string name="following">Following</string>
<string name="self">Self</string>
+ <string name="set_remote_profile_title">Remote profiles</string>
+ <string name="set_remote_profile">The app will display publicly profiles to get all messages. Interactions will need an extra step to federate messages.</string>
</resources> \ No newline at end of file
diff --git a/app/src/main/res/xml/pref_interface.xml b/app/src/main/res/xml/pref_interface.xml
index 55b5f58ec..ef3387c38 100644
--- a/app/src/main/res/xml/pref_interface.xml
+++ b/app/src/main/res/xml/pref_interface.xml
@@ -28,6 +28,14 @@
app:summary="@string/set_remove_left_margin"
app:title="@string/set_remove_left_margin_title" />
+ <SwitchPreferenceCompat
+ app:defaultValue="false"
+ app:iconSpaceReserved="false"
+ app:key="@string/SET_PROFILE_REMOTELY"
+ app:singleLineTitle="false"
+ app:summary="@string/set_remote_profile"
+ app:title="@string/set_remote_profile_title" />
+
<SwitchPreferenceCompat
app:defaultValue="true"