Release 3.13.4

This commit is contained in:
Thomas 2023-01-01 18:20:18 +01:00
parent 7303e7faa8
commit 61798a7ce1
6 changed files with 32 additions and 11 deletions

View file

@ -1,4 +1,9 @@
[
{
"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",

View file

@ -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);

View file

@ -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)

View file

@ -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>

View file

@ -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"

View file

@ -1,8 +1,10 @@
Added:
- Add Bubble timeline support in extra-features
- Add Bubble timeline support in extra-features with filters
- Allow to display public profiles by default to get all messages (Settings > Interface)
Changed:
- Full rework on links in messages (also mentions and tags)
Fixed:
- Spoiler text when editing
- Spoiler text when editing
- Fix watermarks