Fix layout

This commit is contained in:
tom79 2019-06-19 18:48:41 +02:00
parent eb6a87c776
commit 27bfe8875c
5 changed files with 8 additions and 17 deletions

View File

@ -139,7 +139,7 @@ import static app.fedilab.android.helper.Helper.changeDrawableColor;
public abstract class BaseMainActivity extends BaseActivity
implements NavigationView.OnNavigationItemSelectedListener, OnUpdateAccountInfoInterface, OnRetrieveMetaDataInterface, OnRetrieveInstanceInterface, OnRetrieveRemoteAccountInterface, OnRetrieveEmojiAccountInterface, OnFilterActionInterface, OnSyncTimelineInterface, OnAdminActionInterface {
implements NavigationView.OnNavigationItemSelectedListener, OnUpdateAccountInfoInterface, OnRetrieveMetaDataInterface, OnRetrieveInstanceInterface, OnRetrieveRemoteAccountInterface, OnRetrieveEmojiAccountInterface, OnFilterActionInterface, OnSyncTimelineInterface {
private FloatingActionButton toot, delete_all, add_new;
@ -284,9 +284,6 @@ public abstract class BaseMainActivity extends BaseActivity
viewPager = findViewById(R.id.viewpager);
new PostAdminActionAsyncTask(getApplicationContext(), API.adminAction.GET_ACCOUNTS, null, null, BaseMainActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
new PostAdminActionAsyncTask(getApplicationContext(), API.adminAction.GET_REPORTS, null, null, BaseMainActivity.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
display_timeline.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -2078,11 +2075,6 @@ public abstract class BaseMainActivity extends BaseActivity
}
}
@Override
public void onAdminAction(APIResponse apiResponse) {
}
/**
* Page Adapter for Mastodon & Peertube & PixelFed
*/

View File

@ -96,7 +96,7 @@ public class AccountsAdminListAdapter extends RecyclerView.Adapter implements On
holder.account_ac.setVisibility(View.VISIBLE);
holder.report_action_taken.setText(accountAdmin.getIp());
Helper.loadGiF(context, account.getAvatar(), holder.account_pp);
}
@Override

View File

@ -72,8 +72,8 @@ public class ReportsListAdapter extends RecyclerView.Adapter implements OnRetrie
Account target_account = report.getTarget_account().getAccount();
/*account.makeAccountNameEmoji(context, ReportsListAdapter.this, account);
target_account.makeAccountNameEmoji(context, ReportsListAdapter.this, target_account);*/
account.makeAccountNameEmoji(context, ReportsListAdapter.this, account);
target_account.makeAccountNameEmoji(context, ReportsListAdapter.this, target_account);
if( account.getdisplayNameSpan() == null || account.getdisplayNameSpan().toString().trim().equals("")) {
if( account.getDisplay_name() != null && !account.getDisplay_name().trim().equals(""))
holder.account_dn_reporter.setText(Helper.shortnameToUnicode(account.getDisplay_name(), true));

View File

@ -49,7 +49,7 @@ import es.dmoral.toasty.Toasty;
/**
* Created by Thomas on 19/06/2019.
* Fragment to display content related to reports
* Fragment to display content related to accounts
*/
public class DisplayAdminAccountsFragment extends Fragment implements OnAdminActionInterface {
@ -104,7 +104,7 @@ public class DisplayAdminAccountsFragment extends Fragment implements OnAdminAct
if (firstVisibleItem + visibleItemCount == totalItemCount) {
if (!flag_loading) {
flag_loading = true;
asyncTask = new PostAdminActionAsyncTask(context, API.adminAction.GET_REPORTS, null, null, DisplayAdminAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
asyncTask = new PostAdminActionAsyncTask(context, API.adminAction.GET_ACCOUNTS, null, null, DisplayAdminAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
nextElementLoader.setVisibility(View.VISIBLE);
}
} else {
@ -122,7 +122,7 @@ public class DisplayAdminAccountsFragment extends Fragment implements OnAdminAct
firstLoad = true;
flag_loading = true;
swiped = true;
asyncTask = new PostAdminActionAsyncTask(context, API.adminAction.GET_REPORTS, null, null, DisplayAdminAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
asyncTask = new PostAdminActionAsyncTask(context, API.adminAction.GET_ACCOUNTS, null, null, DisplayAdminAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
});
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
@ -148,7 +148,7 @@ public class DisplayAdminAccountsFragment extends Fragment implements OnAdminAct
break;
}
asyncTask = new PostAdminActionAsyncTask(context, API.adminAction.GET_REPORTS, null, null, DisplayAdminAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
asyncTask = new PostAdminActionAsyncTask(context, API.adminAction.GET_ACCOUNTS, null, null, DisplayAdminAccountsFragment.this).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
return rootView;
}

View File

@ -89,7 +89,6 @@
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:layout_marginStart="10dp"
android:visibility="gone"
android:id="@+id/report_comment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />