mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2025-01-07 00:20:08 +02:00
Display reports
This commit is contained in:
parent
2d87254ac0
commit
f213b0ddcb
4 changed files with 28 additions and 25 deletions
|
@ -330,7 +330,6 @@ public class AccountReportActivity extends BaseActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item) {
|
public boolean onOptionsItemSelected(MenuItem item) {
|
||||||
if (item.getItemId() == android.R.id.home) {
|
if (item.getItemId() == android.R.id.home) {
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class LoginActivity extends BaseActivity {
|
||||||
String scope = requestedAdmin ? Helper.OAUTH_SCOPES_ADMIN : Helper.OAUTH_SCOPES;
|
String scope = requestedAdmin ? Helper.OAUTH_SCOPES_ADMIN : Helper.OAUTH_SCOPES;
|
||||||
oauthVM.createToken(currentInstanceLogin, "authorization_code", client_idLogin, client_secretLogin, Helper.REDIRECT_CONTENT_WEB, scope, code)
|
oauthVM.createToken(currentInstanceLogin, "authorization_code", client_idLogin, client_secretLogin, Helper.REDIRECT_CONTENT_WEB, scope, code)
|
||||||
.observe(LoginActivity.this, tokenObj -> {
|
.observe(LoginActivity.this, tokenObj -> {
|
||||||
|
if (tokenObj != null) {
|
||||||
Account account = new Account();
|
Account account = new Account();
|
||||||
account.client_id = client_idLogin;
|
account.client_id = client_idLogin;
|
||||||
account.client_secret = client_secretLogin;
|
account.client_secret = client_secretLogin;
|
||||||
|
@ -90,6 +91,10 @@ public class LoginActivity extends BaseActivity {
|
||||||
WebviewConnectActivity.proceedLogin(LoginActivity.this, account);
|
WebviewConnectActivity.proceedLogin(LoginActivity.this, account);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
Toasty.error(LoginActivity.this, getString(R.string.toast_token), Toast.LENGTH_LONG).show();
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1786,7 +1786,7 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
MastodonHelper.scheduleBoost(context, MastodonHelper.ScheduleType.BOOST, statusToDeal, null, null);
|
MastodonHelper.scheduleBoost(context, MastodonHelper.ScheduleType.BOOST, statusToDeal, null, null);
|
||||||
} else if (itemId == R.id.action_admin) {
|
} else if (itemId == R.id.action_admin) {
|
||||||
Intent intent = new Intent(context, AccountReportActivity.class);
|
Intent intent = new Intent(context, AccountReportActivity.class);
|
||||||
intent.putExtra(Helper.ARG_ACCOUNT, statusToDeal.account);
|
intent.putExtra(Helper.ARG_ACCOUNT_ID, statusToDeal.account.id);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
} else if (itemId == R.id.action_open_browser) {
|
} else if (itemId == R.id.action_open_browser) {
|
||||||
Helper.openBrowser(context, statusToDeal.url);
|
Helper.openBrowser(context, statusToDeal.url);
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatImageView
|
<androidx.appcompat.widget.AppCompatImageView
|
||||||
android:id="@+id/account_pp"
|
android:id="@+id/account_pp"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
|
|
Loading…
Reference in a new issue