2020-07-07 16:20:43 +02:00
|
|
|
package org.mian.gitnex.adapters;
|
|
|
|
|
|
|
|
import android.annotation.SuppressLint;
|
2020-08-04 22:50:04 +02:00
|
|
|
import android.app.Activity;
|
2021-12-17 18:50:03 +01:00
|
|
|
import android.app.Dialog;
|
2020-07-07 16:20:43 +02:00
|
|
|
import android.content.Context;
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
import android.content.Intent;
|
2022-05-05 16:57:22 +02:00
|
|
|
import android.os.Handler;
|
2020-07-07 16:20:43 +02:00
|
|
|
import android.view.LayoutInflater;
|
|
|
|
import android.view.View;
|
|
|
|
import android.view.ViewGroup;
|
|
|
|
import android.widget.ImageView;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import androidx.recyclerview.widget.RecyclerView;
|
2022-08-12 04:02:04 +02:00
|
|
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
2022-09-21 07:43:00 +02:00
|
|
|
import io.mikael.urlbuilder.UrlBuilder;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Objects;
|
2022-05-05 16:57:22 +02:00
|
|
|
import org.gitnex.tea4j.v2.models.NotificationCount;
|
2020-07-07 16:20:43 +02:00
|
|
|
import org.mian.gitnex.R;
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
import org.mian.gitnex.activities.AddNewAccountActivity;
|
2020-07-19 12:13:37 +02:00
|
|
|
import org.mian.gitnex.clients.PicassoService;
|
2022-05-05 16:57:22 +02:00
|
|
|
import org.mian.gitnex.clients.RetrofitClient;
|
2021-04-13 20:56:50 +02:00
|
|
|
import org.mian.gitnex.database.api.BaseApi;
|
2020-08-04 22:50:04 +02:00
|
|
|
import org.mian.gitnex.database.api.UserAccountsApi;
|
2020-07-07 16:20:43 +02:00
|
|
|
import org.mian.gitnex.database.models.UserAccount;
|
2021-04-13 16:19:42 +02:00
|
|
|
import org.mian.gitnex.helpers.AppUtil;
|
2020-07-19 12:13:37 +02:00
|
|
|
import org.mian.gitnex.helpers.RoundedTransformation;
|
2020-07-07 19:15:01 +02:00
|
|
|
import org.mian.gitnex.helpers.TinyDB;
|
2020-07-07 16:20:43 +02:00
|
|
|
import org.mian.gitnex.helpers.Toasty;
|
2022-11-23 12:34:57 +01:00
|
|
|
import org.mian.gitnex.helpers.UrlHelper;
|
2022-05-05 16:57:22 +02:00
|
|
|
import retrofit2.Call;
|
|
|
|
import retrofit2.Callback;
|
2020-07-07 16:20:43 +02:00
|
|
|
|
|
|
|
/**
|
2022-04-18 09:10:54 +02:00
|
|
|
* @author M M Arif
|
2020-07-07 16:20:43 +02:00
|
|
|
*/
|
2022-09-21 07:43:00 +02:00
|
|
|
public class UserAccountsAdapter
|
|
|
|
extends RecyclerView.Adapter<UserAccountsAdapter.UserAccountsViewHolder> {
|
2020-07-07 16:20:43 +02:00
|
|
|
|
2021-02-25 00:22:11 +01:00
|
|
|
private final List<UserAccount> userAccountsList;
|
2021-04-13 16:19:42 +02:00
|
|
|
private final Context context;
|
2021-12-17 18:50:03 +01:00
|
|
|
private final Dialog dialog;
|
2022-08-26 19:00:08 +02:00
|
|
|
private final TinyDB tinyDB;
|
2020-07-07 16:20:43 +02:00
|
|
|
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
public UserAccountsAdapter(Context ctx, Dialog dialog) {
|
2021-12-17 18:50:03 +01:00
|
|
|
this.dialog = dialog;
|
2021-04-13 16:19:42 +02:00
|
|
|
this.context = ctx;
|
2022-09-21 07:43:00 +02:00
|
|
|
this.userAccountsList =
|
|
|
|
Objects.requireNonNull(BaseApi.getInstance(context, UserAccountsApi.class))
|
|
|
|
.usersAccounts();
|
2022-08-26 19:00:08 +02:00
|
|
|
this.tinyDB = TinyDB.getInstance(context);
|
2020-07-07 16:20:43 +02:00
|
|
|
}
|
|
|
|
|
2020-08-04 22:50:04 +02:00
|
|
|
private void updateLayoutByPosition(int position) {
|
2020-07-07 16:20:43 +02:00
|
|
|
|
|
|
|
userAccountsList.remove(position);
|
|
|
|
notifyItemRemoved(position);
|
|
|
|
notifyItemRangeChanged(position, userAccountsList.size());
|
2021-04-13 16:19:42 +02:00
|
|
|
Toasty.success(context, context.getResources().getString(R.string.accountDeletedMessage));
|
2020-07-07 16:20:43 +02:00
|
|
|
}
|
|
|
|
|
2022-05-05 16:57:22 +02:00
|
|
|
private void getNotificationsCount() {
|
|
|
|
|
|
|
|
Call<NotificationCount> call = RetrofitClient.getApiInterface(context).notifyNewAvailable();
|
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
call.enqueue(
|
|
|
|
new Callback<>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onResponse(
|
|
|
|
@NonNull Call<NotificationCount> call,
|
|
|
|
@NonNull retrofit2.Response<NotificationCount> response) {
|
|
|
|
|
|
|
|
NotificationCount notificationCount = response.body();
|
|
|
|
|
|
|
|
if (response.code() == 200) {
|
|
|
|
|
|
|
|
assert notificationCount != null;
|
|
|
|
if (notificationCount.getNew() > 0) {
|
|
|
|
String toastMsg =
|
|
|
|
context.getResources()
|
|
|
|
.getQuantityString(
|
|
|
|
R.plurals.youHaveNewNotifications,
|
|
|
|
Math.toIntExact(notificationCount.getNew()),
|
|
|
|
Math.toIntExact(
|
|
|
|
notificationCount.getNew()));
|
|
|
|
new Handler()
|
|
|
|
.postDelayed(() -> Toasty.info(context, toastMsg), 5000);
|
|
|
|
}
|
|
|
|
}
|
2022-05-05 16:57:22 +02:00
|
|
|
}
|
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
@Override
|
|
|
|
public void onFailure(
|
|
|
|
@NonNull Call<NotificationCount> call, @NonNull Throwable t) {}
|
|
|
|
});
|
2022-05-05 16:57:22 +02:00
|
|
|
}
|
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
@NonNull @Override
|
|
|
|
public UserAccountsAdapter.UserAccountsViewHolder onCreateViewHolder(
|
|
|
|
@NonNull ViewGroup parent, int viewType) {
|
2020-07-07 16:20:43 +02:00
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
View v =
|
|
|
|
LayoutInflater.from(parent.getContext())
|
|
|
|
.inflate(R.layout.list_user_accounts, parent, false);
|
2020-07-07 16:20:43 +02:00
|
|
|
return new UserAccountsViewHolder(v);
|
|
|
|
}
|
|
|
|
|
|
|
|
@SuppressLint("DefaultLocale")
|
|
|
|
@Override
|
2022-09-21 07:43:00 +02:00
|
|
|
public void onBindViewHolder(
|
|
|
|
@NonNull UserAccountsAdapter.UserAccountsViewHolder holder, int position) {
|
2020-07-07 16:20:43 +02:00
|
|
|
|
|
|
|
UserAccount currentItem = userAccountsList.get(position);
|
|
|
|
|
2022-08-15 16:26:02 +02:00
|
|
|
String url = UrlBuilder.fromString(currentItem.getInstanceUrl()).withPath("/").toString();
|
2020-07-07 16:20:43 +02:00
|
|
|
|
2021-02-25 00:22:11 +01:00
|
|
|
holder.accountId = currentItem.getAccountId();
|
|
|
|
holder.accountName = currentItem.getAccountName();
|
|
|
|
|
2021-04-13 16:19:42 +02:00
|
|
|
holder.userId.setText(currentItem.getUserName());
|
2022-09-21 07:43:00 +02:00
|
|
|
if (currentItem.isLoggedIn()) {
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
holder.accountUrl.setText(url);
|
2022-09-21 07:43:00 +02:00
|
|
|
} else {
|
Don't use TinyDB as cache (#1034)
Do not use TinyDB as a cache or a way to send data between activities.
### How is this working
Instead of saving everything into the TinyDB, I created three `Context`s (a `RepositoryContext`, an `IssueContext` and an `AccountContext`). All are used to store things like API or database values/models and additional data, e.g. the `RepositoryContext` also contains information about the current filter state of a repository (issues, pull requests, releases/tags and milestones). These are sent using `Intent`s and `Bundle`s between activities and fragments. Changing a field (e.g. filter state) in any fragment changes it also for the whole repository (or at least it should do so).
Due to the size of the changes (after https://codeberg.org/gitnex/GitNex/commit/c9172f85efafd9f25739fdd8385e1904b711ea41, Git says `154 files changed, 3318 insertions(+), 3835 deletions(-)`) **I highly recommend you to create a beta/pre release before releasing a stable version**.
Additional changes:
* after logging out, the account remains in the account list (with a note) and you can log in again (you can't switch to this account)
* repositories and organizations are clickable on user profiles
* deleted two unused classes
Once finished, hopefully
* closes #354
* replaces #897
* fixes #947
* closes #1001
* closes #1015
* marks #876 and #578 as `Wontfix` since they are not necessary at this point
* and all the other TinyDB issues
Co-authored-by: qwerty287 <ndev@web.de>
Co-authored-by: M M Arif <mmarif@noreply.codeberg.org>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/1034
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: qwerty287 <qwerty287@noreply.codeberg.org>
Co-committed-by: qwerty287 <qwerty287@noreply.codeberg.org>
2022-03-13 03:59:13 +01:00
|
|
|
holder.accountUrl.setText(context.getString(R.string.notLoggedIn, url));
|
|
|
|
}
|
2020-07-07 16:20:43 +02:00
|
|
|
|
2022-08-26 19:00:08 +02:00
|
|
|
int imgRadius = AppUtil.getPixelsFromDensity(context, 60);
|
2020-07-19 12:13:37 +02:00
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
PicassoService.getInstance(context)
|
|
|
|
.get()
|
2022-11-23 12:34:57 +01:00
|
|
|
.load(UrlHelper.appendPath(currentItem.getInstanceUrl(), "assets/img/favicon.png"))
|
2022-09-21 07:43:00 +02:00
|
|
|
.placeholder(R.drawable.loader_animated)
|
|
|
|
.transform(new RoundedTransformation(imgRadius, 0))
|
|
|
|
.resize(120, 120)
|
|
|
|
.centerCrop()
|
|
|
|
.into(holder.repoAvatar);
|
2021-02-25 00:22:11 +01:00
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
if (tinyDB.getInt("currentActiveAccountId") == currentItem.getAccountId()) {
|
2020-07-07 16:20:43 +02:00
|
|
|
holder.activeAccount.setVisibility(View.VISIBLE);
|
2022-09-21 07:43:00 +02:00
|
|
|
} else {
|
2020-08-04 22:50:04 +02:00
|
|
|
holder.deleteAccount.setVisibility(View.VISIBLE);
|
2020-07-07 16:20:43 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public int getItemCount() {
|
|
|
|
return userAccountsList.size();
|
|
|
|
}
|
|
|
|
|
2022-08-15 16:26:02 +02:00
|
|
|
class UserAccountsViewHolder extends RecyclerView.ViewHolder {
|
|
|
|
|
|
|
|
private final TextView accountUrl;
|
|
|
|
private final TextView userId;
|
|
|
|
private final ImageView activeAccount;
|
|
|
|
private final ImageView deleteAccount;
|
|
|
|
private final ImageView repoAvatar;
|
|
|
|
private int accountId;
|
|
|
|
private String accountName;
|
|
|
|
|
|
|
|
private UserAccountsViewHolder(View itemView) {
|
|
|
|
|
|
|
|
super(itemView);
|
|
|
|
|
|
|
|
accountUrl = itemView.findViewById(R.id.accountUrl);
|
|
|
|
userId = itemView.findViewById(R.id.userId);
|
|
|
|
activeAccount = itemView.findViewById(R.id.activeAccount);
|
|
|
|
deleteAccount = itemView.findViewById(R.id.deleteAccount);
|
|
|
|
repoAvatar = itemView.findViewById(R.id.repoAvatar);
|
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
deleteAccount.setOnClickListener(
|
|
|
|
itemDelete -> {
|
|
|
|
MaterialAlertDialogBuilder materialAlertDialogBuilder =
|
|
|
|
new MaterialAlertDialogBuilder(context)
|
|
|
|
.setTitle(
|
|
|
|
context.getResources()
|
|
|
|
.getString(
|
|
|
|
R.string.removeAccountPopupTitle))
|
|
|
|
.setMessage(
|
|
|
|
context.getResources()
|
|
|
|
.getString(
|
|
|
|
R.string.removeAccountPopupMessage))
|
|
|
|
.setNeutralButton(
|
|
|
|
context.getResources()
|
|
|
|
.getString(R.string.cancelButton),
|
|
|
|
null)
|
|
|
|
.setPositiveButton(
|
|
|
|
context.getResources()
|
|
|
|
.getString(R.string.removeButton),
|
|
|
|
(dialog, which) -> {
|
|
|
|
updateLayoutByPosition(
|
|
|
|
getBindingAdapterPosition());
|
|
|
|
UserAccountsApi userAccountsApi =
|
|
|
|
BaseApi.getInstance(
|
|
|
|
context, UserAccountsApi.class);
|
|
|
|
assert userAccountsApi != null;
|
|
|
|
userAccountsApi.deleteAccount(
|
|
|
|
Integer.parseInt(
|
|
|
|
String.valueOf(accountId)));
|
|
|
|
});
|
|
|
|
|
|
|
|
materialAlertDialogBuilder.create().show();
|
2022-08-15 16:26:02 +02:00
|
|
|
});
|
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
itemView.setOnClickListener(
|
|
|
|
switchAccount -> {
|
|
|
|
UserAccountsApi userAccountsApi =
|
|
|
|
BaseApi.getInstance(context, UserAccountsApi.class);
|
|
|
|
assert userAccountsApi != null;
|
|
|
|
UserAccount userAccount = userAccountsApi.getAccountByName(accountName);
|
|
|
|
|
|
|
|
if (!userAccount.isLoggedIn()) {
|
|
|
|
UrlBuilder url =
|
|
|
|
UrlBuilder.fromString(userAccount.getInstanceUrl())
|
|
|
|
.withPath("/");
|
|
|
|
|
|
|
|
String host;
|
|
|
|
if (url.scheme.equals("http")) {
|
|
|
|
if (url.port == 80 || url.port == 0) {
|
|
|
|
host = url.hostName;
|
|
|
|
} else {
|
|
|
|
host = url.hostName + ":" + url.port;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (url.port == 443 || url.port == 0) {
|
|
|
|
host = url.hostName;
|
|
|
|
} else {
|
|
|
|
host = url.hostName + ":" + url.port;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Toasty.warning(context, context.getString(R.string.logInAgain));
|
|
|
|
dialog.dismiss();
|
|
|
|
|
|
|
|
Intent i = new Intent(context, AddNewAccountActivity.class);
|
|
|
|
i.putExtra("instanceUrl", host);
|
|
|
|
i.putExtra("scheme", url.scheme);
|
|
|
|
i.putExtra("token", userAccount.getToken());
|
|
|
|
context.startActivity(i);
|
|
|
|
return;
|
2022-08-15 16:26:02 +02:00
|
|
|
}
|
|
|
|
|
2022-09-21 07:43:00 +02:00
|
|
|
if (tinyDB.getInt("currentActiveAccountId") != userAccount.getAccountId()) {
|
|
|
|
if (AppUtil.switchToAccount(context, userAccount)) {
|
|
|
|
|
|
|
|
String url =
|
|
|
|
UrlBuilder.fromString(userAccount.getInstanceUrl())
|
|
|
|
.withPath("/")
|
|
|
|
.toString();
|
|
|
|
|
|
|
|
Toasty.success(
|
|
|
|
context,
|
|
|
|
context.getResources()
|
|
|
|
.getString(
|
|
|
|
R.string.switchAccountSuccess,
|
|
|
|
userAccount.getUserName(),
|
|
|
|
url));
|
|
|
|
getNotificationsCount();
|
|
|
|
((Activity) context).recreate();
|
|
|
|
dialog.dismiss();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2022-08-15 16:26:02 +02:00
|
|
|
}
|
|
|
|
}
|
2020-07-07 16:20:43 +02:00
|
|
|
}
|