Some fixes
This commit is contained in:
parent
3da8d8ff0c
commit
c310670936
|
@ -52,6 +52,7 @@ public class Notification implements Parcelable {
|
|||
private Date created_at;
|
||||
private Account account;
|
||||
private Status status;
|
||||
private boolean notificationAnimated = false;
|
||||
|
||||
protected Notification(Parcel in) {
|
||||
id = in.readString();
|
||||
|
@ -238,4 +239,11 @@ public class Notification implements Parcelable {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isNotificationAnimated() {
|
||||
return notificationAnimated;
|
||||
}
|
||||
|
||||
public void setNotificationAnimated(boolean notificationAnimated) {
|
||||
this.notificationAnimated = notificationAnimated;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ import java.io.FileOutputStream;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
|
@ -374,14 +376,24 @@ public class NotificationsListAdapter extends RecyclerView.Adapter implements On
|
|||
holder.status_document_container.setVisibility(View.GONE);
|
||||
else
|
||||
holder.status_document_container.setVisibility(View.VISIBLE);
|
||||
if( !status.isStatusAnimated()) {
|
||||
status.setStatusAnimated(true);
|
||||
Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(new Runnable() {
|
||||
if( !notification.isNotificationAnimated() && status.getEmojis().size() > 0) {
|
||||
notification.setNotificationAnimated(true);
|
||||
try{
|
||||
Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
holder.notification_status_content.invalidate();
|
||||
}
|
||||
}, 0, 130, TimeUnit.MILLISECONDS);
|
||||
}catch (Exception ignored){}
|
||||
|
||||
|
||||
/*new Timer().scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
holder.notification_status_content.invalidate();
|
||||
}
|
||||
}, 0, 100, TimeUnit.MILLISECONDS);
|
||||
}, 0, 500);*/
|
||||
}
|
||||
if( !status.isClickable())
|
||||
Status.transform(context, status);
|
||||
|
|
|
@ -105,6 +105,8 @@ import java.util.Date;
|
|||
import java.util.GregorianCalendar;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Matcher;
|
||||
|
@ -1173,14 +1175,17 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
|
|||
holder.status_toot_date.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12 * textSizePercent / 100);
|
||||
holder.status_content_translated.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14 * textSizePercent / 100);
|
||||
}
|
||||
if( !status.isStatusAnimated()) {
|
||||
if( !status.isStatusAnimated() && status.getEmojis().size() > 0 ) {
|
||||
status.setStatusAnimated(true);
|
||||
Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
holder.status_content.invalidate();
|
||||
}
|
||||
}, 0, 100, TimeUnit.MILLISECONDS);
|
||||
try{
|
||||
Executors.newSingleThreadScheduledExecutor().scheduleAtFixedRate(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
holder.status_content.invalidate();
|
||||
}
|
||||
}, 0, 130, TimeUnit.MILLISECONDS);
|
||||
}catch (Exception ignored){}
|
||||
|
||||
}
|
||||
holder.status_spoiler.setTextSize(TypedValue.COMPLEX_UNIT_SP, 14 * textSizePercent / 100);
|
||||
|
||||
|
|
Loading…
Reference in New Issue