Skip to content

Commit

Permalink
chore(merge-upstream): commenting out the lines that made the compila…
Browse files Browse the repository at this point in the history
…tion fail
  • Loading branch information
LucasGGamerM committed Mar 3, 2024
1 parent e295c8c commit 633261c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import static org.joinmastodon.android.model.FilterContext.*;
import static org.junit.Assert.*;

import android.graphics.drawable.ColorDrawable;

import org.joinmastodon.android.model.Attachment;
import org.joinmastodon.android.model.LegacyFilter;
import org.joinmastodon.android.model.Status;
import org.junit.Test;
Expand Down Expand Up @@ -32,11 +35,11 @@ public class StatusFilterPredicateTest {
warnMeFilter.filterAction = WARN;
warnMeFilter.context = EnumSet.of(PUBLIC, HOME);

noAltText.mediaAttachments = Attachment.createFakeAttachments("fakeurl", new ColorDrawable());
withAltText.mediaAttachments = Attachment.createFakeAttachments("fakeurl", new ColorDrawable());
for (Attachment mediaAttachment : withAltText.mediaAttachments) {
mediaAttachment.description = "Alt Text";
}
// noAltText.mediaAttachments = Attachment.createFakeAttachments("fakeurl", new ColorDrawable());
// withAltText.mediaAttachments = Attachment.createFakeAttachments("fakeurl", new ColorDrawable());
// for (Attachment mediaAttachment : withAltText.mediaAttachments) {
// mediaAttachment.description = "Alt Text";
// }
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ public boolean onOptionsItemSelected(MenuItem item){
if(id==R.id.select){
enterSelectionMode();
}else if(id==R.id.select_all){
for(AccountViewModel a:data){
selectedAccounts.add(a.account.id);
}
// for(AccountViewModel a:data){
// selectedAccounts.add(a.account.id);
// }
enterSelectionMode();
}
return true;
Expand Down Expand Up @@ -309,10 +309,10 @@ public void onError(ErrorResponse error){

private void removeAccountRows(Set<String> ids){
for(int i=data.size()-1;i>=0;i--){
if(ids.contains(data.get(i).account.id)){
data.remove(i);
list.getAdapter().notifyItemRemoved(i);
}
// if(ids.contains(data.get(i).account.id)){
// data.remove(i);
// list.getAdapter().notifyItemRemoved(i);
// }
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
.setIcon(R.drawable.ic_fluent_people_add_28_regular)
.setView(editor)
.setPositiveButton(R.string.sk_create, (d, which) ->
new CreateList(editor.getTitle(), editor.isExclusive(), editor.getRepliesPolicy()).setCallback(new Callback<>() {
new CreateList(editor.getTitle(), editor.getRepliesPolicy(), editor.isExclusive()).setCallback(new Callback<>() {
@Override
public void onSuccess(FollowList list) {
data.add(0, list);
Expand All @@ -120,16 +120,16 @@ public void onError(ErrorResponse error) {
private void saveListMembership(String listId, boolean isMember) {
userInList.put(listId, isMember);
List<String> accountIdList = Collections.singletonList(profileAccountId);
MastodonAPIRequest<Object> req = isMember ? new AddAccountsToList(listId, accountIdList) : new RemoveAccountsFromList(listId, accountIdList);
req.setCallback(new Callback<>() {
@Override
public void onSuccess(Object o) {}

@Override
public void onError(ErrorResponse error) {
error.showToast(getContext());
}
}).exec(accountID);
// MastodonAPIRequest<Object> req = (MastodonAPIRequest<Object>) (isMember ? new AddAccountsToList(listId, accountIdList) : new RemoveAccountsFromList(listId, accountIdList));
// req.setCallback(new Callback<>() {
// @Override
// public void onSuccess(Object o) {}
//
// @Override
// public void onError(ErrorResponse error) {
// error.showToast(getContext());
// }
// }).exec(accountID);
}

@Override
Expand Down Expand Up @@ -170,7 +170,7 @@ public void onSuccess(List<FollowList> allLists) {
public void onListDeletedEvent(ListDeletedEvent event) {
for (int i = 0; i < data.size(); i++) {
FollowList item = data.get(i);
if (item.id.equals(event.id)) {
if (item.id.equals(event.listID)) {
data.remove(i);
adapter.notifyItemRemoved(i);
break;
Expand Down

0 comments on commit 633261c

Please sign in to comment.