mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
Release 3.9.0
This commit is contained in:
parent
9959904853
commit
e1e5284a47
9 changed files with 34 additions and 17 deletions
|
@ -13,8 +13,8 @@ android {
|
|||
defaultConfig {
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 434
|
||||
versionName "3.8.1"
|
||||
versionCode 435
|
||||
versionName "3.9.0"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
flavorDimensions "default"
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
[
|
||||
{
|
||||
"version": "3.9.0",
|
||||
"code": "435",
|
||||
"note": "Added:\n- Migrate to Material Design 3\n- 5 Themes (Light, Dark, Solarized Light/Dark, Black)\n- Automatically switch between Light/Dark\n- Light and Dark theme can be defined for time-based switch\n- Android 12+: Dynamic color\n\nFixed:\n- Jumps in timelines\n"
|
||||
},
|
||||
{
|
||||
"version": "3.8.1",
|
||||
"code": "434",
|
||||
|
|
|
@ -47,6 +47,7 @@ import androidx.annotation.NonNull;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.ActionBar;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.app.ActivityOptionsCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
@ -148,8 +149,7 @@ public class ProfileActivity extends BaseActivity {
|
|||
mention_str = b.getString(Helper.ARG_MENTION, null);
|
||||
checkRemotely = b.getBoolean(Helper.ARG_CHECK_REMOTELY, false);
|
||||
}
|
||||
postponeEnterTransition();
|
||||
|
||||
ActivityCompat.postponeEnterTransition(ProfileActivity.this);
|
||||
//Remove title
|
||||
if (actionBar != null) {
|
||||
actionBar.setDisplayShowTitleEnabled(false);
|
||||
|
@ -270,18 +270,19 @@ public class ProfileActivity extends BaseActivity {
|
|||
@Override
|
||||
public void onResourceReady(@NonNull final Drawable resource, Transition<? super Drawable> transition) {
|
||||
binding.profilePicture.setImageDrawable(resource);
|
||||
startPostponedEnterTransition();
|
||||
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadFailed(@Nullable Drawable errorDrawable) {
|
||||
binding.profilePicture.setImageResource(R.drawable.ic_person);
|
||||
startPostponedEnterTransition();
|
||||
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLoadCleared(@Nullable Drawable placeholder) {
|
||||
|
||||
binding.profilePicture.setImageResource(R.drawable.ic_person);
|
||||
ActivityCompat.startPostponedEnterTransition(ProfileActivity.this);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
@ -164,16 +164,16 @@ public class NotificationAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
|
|||
AccountsVM accountsVM = new ViewModelProvider((ViewModelStoreOwner) context).get(AccountsVM.class);
|
||||
holderFollow.binding.rejectButton.setOnClickListener(v -> accountsVM.rejectFollow(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, notification.account.id)
|
||||
.observe((LifecycleOwner) context, relationShip -> {
|
||||
if (notificationList.size() > position) {
|
||||
notificationList.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
if (notificationList.size() > holderFollow.getBindingAdapterPosition()) {
|
||||
notificationList.remove(holderFollow.getBindingAdapterPosition());
|
||||
notifyItemRemoved(holderFollow.getBindingAdapterPosition());
|
||||
}
|
||||
}));
|
||||
holderFollow.binding.acceptButton.setOnClickListener(v -> accountsVM.acceptFollow(BaseMainActivity.currentInstance, BaseMainActivity.currentToken, notification.account.id)
|
||||
.observe((LifecycleOwner) context, relationShip -> {
|
||||
if (notificationList.size() > position) {
|
||||
notificationList.remove(position);
|
||||
notifyItemRemoved(position);
|
||||
if (notificationList.size() > holderFollow.getBindingAdapterPosition()) {
|
||||
notificationList.remove(holderFollow.getBindingAdapterPosition());
|
||||
notifyItemRemoved(holderFollow.getBindingAdapterPosition());
|
||||
}
|
||||
}));
|
||||
holderFollow.binding.avatar.setOnClickListener(v -> {
|
||||
|
|
|
@ -1191,6 +1191,7 @@ public class AccountsVM extends AndroidViewModel {
|
|||
if (acceptFollowResponse.isSuccessful()) {
|
||||
relationShip = acceptFollowResponse.body();
|
||||
}
|
||||
new StatusCache(getApplication().getApplicationContext()).deleteStatus(instance, id);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -1221,6 +1222,7 @@ public class AccountsVM extends AndroidViewModel {
|
|||
if (rejectFollowResponse.isSuccessful()) {
|
||||
relationShip = rejectFollowResponse.body();
|
||||
}
|
||||
new StatusCache(getApplication().getApplicationContext()).deleteStatus(instance, id);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -77,7 +77,6 @@
|
|||
android:id="@+id/account_pp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_margin="3dp"
|
||||
android:contentDescription="@string/profile_picture"
|
||||
android:scaleType="centerCrop"
|
||||
android:transitionName="@string/activity_porfile_pp"
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/container"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_margin="12dp"
|
||||
android:layout_marginTop="6dp"
|
||||
app:cardElevation="5dp"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="6dp"
|
||||
android:layout_marginHorizontal="@dimen/card_margin"
|
||||
app:cardElevation="5dp"
|
||||
|
||||
android:layout_marginTop="@dimen/card_margin"
|
||||
app:strokeWidth="0dp">
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
Added:
|
||||
- Migrate to Material Design 3
|
||||
- 5 Themes (Light, Dark, Solarized Light/Dark, Black)
|
||||
- Automatically switch between Light/Dark
|
||||
- Light and Dark theme can be defined for time-based switch
|
||||
- Android 12+: Dynamic color
|
||||
|
||||
Fixed:
|
||||
- Jumps in timelines
|
Loading…
Reference in a new issue