2020-08-04 22:50:04 +02:00
|
|
|
package org.mian.gitnex.activities;
|
|
|
|
|
|
|
|
import android.graphics.Color;
|
|
|
|
import android.graphics.drawable.ColorDrawable;
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.util.Log;
|
|
|
|
import android.view.View;
|
|
|
|
import android.widget.ArrayAdapter;
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import androidx.appcompat.app.AlertDialog;
|
2021-02-11 11:23:35 +01:00
|
|
|
import org.gitnex.tea4j.models.GiteaVersion;
|
|
|
|
import org.gitnex.tea4j.models.UserInfo;
|
2020-08-04 22:50:04 +02:00
|
|
|
import org.mian.gitnex.R;
|
|
|
|
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;
|
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.database.models.UserAccount;
|
2020-08-04 22:50:04 +02:00
|
|
|
import org.mian.gitnex.databinding.ActivityAddNewAccountBinding;
|
|
|
|
import org.mian.gitnex.helpers.AppUtil;
|
|
|
|
import org.mian.gitnex.helpers.PathsHelper;
|
|
|
|
import org.mian.gitnex.helpers.Toasty;
|
|
|
|
import org.mian.gitnex.helpers.UrlHelper;
|
|
|
|
import org.mian.gitnex.helpers.Version;
|
2021-12-19 13:39:08 +01:00
|
|
|
import org.mian.gitnex.structs.Protocol;
|
2020-08-04 22:50:04 +02:00
|
|
|
import java.net.URI;
|
|
|
|
import io.mikael.urlbuilder.UrlBuilder;
|
|
|
|
import retrofit2.Call;
|
|
|
|
import retrofit2.Callback;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Author M M Arif
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class AddNewAccountActivity extends BaseActivity {
|
|
|
|
|
|
|
|
private View.OnClickListener onClickListener;
|
|
|
|
private ActivityAddNewAccountBinding viewBinding;
|
|
|
|
|
2020-09-13 06:57:04 +02:00
|
|
|
private String spinnerSelectedValue;
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
|
|
|
|
viewBinding = ActivityAddNewAccountBinding.inflate(getLayoutInflater());
|
2021-01-26 18:43:25 +01:00
|
|
|
setContentView(viewBinding.getRoot());
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
getWindow().getDecorView().setBackground(new ColorDrawable(Color.TRANSPARENT));
|
|
|
|
|
|
|
|
initCloseListener();
|
|
|
|
viewBinding.close.setOnClickListener(onClickListener);
|
2021-07-23 17:41:19 +02:00
|
|
|
viewBinding.instanceUrl.setText(getIntent().getStringExtra("instanceUrl"));
|
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
|
|
|
viewBinding.loginToken.setText(getIntent().getStringExtra("token"));
|
|
|
|
String scheme = getIntent().getStringExtra("scheme");
|
|
|
|
if(scheme != null && scheme.equals("http")) {
|
|
|
|
viewBinding.protocolSpinner.setText(Protocol.HTTP.toString());
|
|
|
|
spinnerSelectedValue = Protocol.HTTP.toString();
|
|
|
|
} else { // default is https
|
|
|
|
viewBinding.protocolSpinner.setText(Protocol.HTTPS.toString());
|
|
|
|
spinnerSelectedValue = Protocol.HTTPS.toString();
|
|
|
|
}
|
2020-08-04 22:50:04 +02:00
|
|
|
|
2020-09-13 06:57:04 +02:00
|
|
|
ArrayAdapter<Protocol> adapterProtocols = new ArrayAdapter<>(ctx, R.layout.list_spinner_items, Protocol.values());
|
2020-08-04 22:50:04 +02:00
|
|
|
|
2021-01-26 16:10:31 +01:00
|
|
|
viewBinding.protocolSpinner.setAdapter(adapterProtocols);
|
2020-09-13 06:57:04 +02:00
|
|
|
viewBinding.protocolSpinner.setOnItemClickListener((parent, view1, position, id) -> spinnerSelectedValue = String.valueOf(parent.getItemAtPosition(position)));
|
2020-09-04 16:33:37 +02:00
|
|
|
viewBinding.addNewAccount.setOnClickListener(login -> {
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
boolean connToInternet = AppUtil.hasNetworkConnection(appCtx);
|
|
|
|
|
|
|
|
if(!connToInternet) {
|
|
|
|
|
|
|
|
Toasty.error(ctx, getResources().getString(R.string.checkNetConnection));
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
processLogin();
|
|
|
|
}
|
2020-09-04 16:33:37 +02:00
|
|
|
});
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private void processLogin() {
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
2020-09-13 06:57:04 +02:00
|
|
|
String instanceUrlET = String.valueOf(viewBinding.instanceUrl.getText());
|
|
|
|
String loginToken = String.valueOf(viewBinding.loginToken.getText());
|
|
|
|
String protocol = spinnerSelectedValue;
|
|
|
|
|
|
|
|
if(protocol == null) {
|
|
|
|
|
|
|
|
Toasty.error(ctx, getResources().getString(R.string.protocolEmptyError));
|
|
|
|
return;
|
|
|
|
}
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
if(instanceUrlET.equals("")) {
|
|
|
|
|
|
|
|
Toasty.error(ctx, getResources().getString(R.string.emptyFieldURL));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(loginToken.equals("")) {
|
|
|
|
|
|
|
|
Toasty.error(ctx, getResources().getString(R.string.loginTokenError));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
URI rawInstanceUrl = UrlBuilder.fromString(UrlHelper.fixScheme(instanceUrlET, "http")).toUri();
|
|
|
|
|
2020-09-24 18:53:28 +02:00
|
|
|
URI instanceUrl = UrlBuilder.fromUri(rawInstanceUrl).withScheme(protocol.toLowerCase()).withPath(PathsHelper.join(rawInstanceUrl.getPath(), "/api/v1/"))
|
2020-08-04 22:50:04 +02:00
|
|
|
.toUri();
|
|
|
|
|
|
|
|
versionCheck(instanceUrl.toString(), loginToken);
|
|
|
|
|
|
|
|
}
|
|
|
|
catch(Exception e) {
|
|
|
|
|
|
|
|
Log.e("onFailure-login", e.toString());
|
|
|
|
Toasty.error(ctx, getResources().getString(R.string.malformedUrl));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private void versionCheck(final String instanceUrl, final String loginToken) {
|
|
|
|
|
|
|
|
Call<GiteaVersion> callVersion;
|
2021-06-20 17:26:13 +02:00
|
|
|
callVersion = RetrofitClient.getApiInterface(ctx, instanceUrl).getGiteaVersionWithToken("token " + loginToken);
|
2020-08-04 22:50:04 +02:00
|
|
|
callVersion.enqueue(new Callback<GiteaVersion>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onResponse(@NonNull final Call<GiteaVersion> callVersion, @NonNull retrofit2.Response<GiteaVersion> responseVersion) {
|
|
|
|
|
|
|
|
if(responseVersion.code() == 200) {
|
|
|
|
|
|
|
|
GiteaVersion version = responseVersion.body();
|
|
|
|
|
|
|
|
assert version != null;
|
2020-10-29 14:13:19 +01:00
|
|
|
|
2020-09-04 16:33:37 +02:00
|
|
|
if(!Version.valid(version.getVersion())) {
|
2020-10-29 14:13:19 +01:00
|
|
|
|
2020-08-04 22:50:04 +02:00
|
|
|
Toasty.error(ctx, getResources().getString(R.string.versionUnknown));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2020-09-04 16:33:37 +02:00
|
|
|
Version giteaVersion = new Version(version.getVersion());
|
|
|
|
|
2020-08-04 22:50:04 +02:00
|
|
|
if(giteaVersion.less(getString(R.string.versionLow))) {
|
|
|
|
|
|
|
|
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(ctx).setTitle(getString(R.string.versionAlertDialogHeader))
|
|
|
|
.setMessage(getResources().getString(R.string.versionUnsupportedOld, version.getVersion())).setIcon(R.drawable.ic_warning)
|
|
|
|
.setCancelable(true);
|
|
|
|
|
2021-10-04 15:35:34 +02:00
|
|
|
alertDialogBuilder.setNeutralButton(getString(R.string.cancelButton), (dialog, which) -> {
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
dialog.dismiss();
|
|
|
|
});
|
|
|
|
|
|
|
|
alertDialogBuilder.setPositiveButton(getString(R.string.textContinue), (dialog, which) -> {
|
|
|
|
|
|
|
|
dialog.dismiss();
|
|
|
|
login(instanceUrl, loginToken);
|
|
|
|
});
|
|
|
|
|
|
|
|
alertDialogBuilder.create().show();
|
|
|
|
}
|
|
|
|
else if(giteaVersion.lessOrEqual(getString(R.string.versionHigh))) {
|
|
|
|
|
|
|
|
login(instanceUrl, loginToken);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
2020-08-06 17:16:51 +02:00
|
|
|
Toasty.warning(ctx, getResources().getString(R.string.versionUnsupportedNew));
|
2020-08-04 22:50:04 +02:00
|
|
|
login(instanceUrl, loginToken);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else if(responseVersion.code() == 403) {
|
|
|
|
|
|
|
|
login(instanceUrl, loginToken);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void login(String instanceUrl, String loginToken) {
|
|
|
|
|
|
|
|
setupNewAccountWithToken(instanceUrl, loginToken);
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(@NonNull Call<GiteaVersion> callVersion, @NonNull Throwable t) {
|
|
|
|
|
|
|
|
Log.e("onFailure-versionCheck", t.toString());
|
2022-04-06 17:27:02 +02:00
|
|
|
Toasty.error(ctx, getResources().getString(R.string.genericServerResponseError));
|
2020-08-04 22:50:04 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private void setupNewAccountWithToken(String instanceUrl, final String loginToken) {
|
|
|
|
|
2020-11-17 19:56:16 +01:00
|
|
|
Call<UserInfo> call = RetrofitClient.getApiInterface(ctx, instanceUrl).getUserInfo("token " + loginToken);
|
2020-08-04 22:50:04 +02:00
|
|
|
|
|
|
|
call.enqueue(new Callback<UserInfo>() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onResponse(@NonNull Call<UserInfo> call, @NonNull retrofit2.Response<UserInfo> response) {
|
|
|
|
|
|
|
|
UserInfo userDetails = response.body();
|
|
|
|
|
|
|
|
switch(response.code()) {
|
|
|
|
|
|
|
|
case 200:
|
|
|
|
|
|
|
|
assert userDetails != null;
|
|
|
|
// insert new account to db if does not exist
|
|
|
|
String accountName = userDetails.getUsername() + "@" + instanceUrl;
|
2021-04-13 20:56:50 +02:00
|
|
|
UserAccountsApi userAccountsApi = BaseApi.getInstance(ctx, UserAccountsApi.class);
|
|
|
|
boolean userAccountExists = userAccountsApi.userAccountExists(accountName);
|
2020-08-04 22:50:04 +02:00
|
|
|
|
2021-04-13 20:56:50 +02:00
|
|
|
if(!userAccountExists) {
|
2020-08-04 22:50:04 +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
|
|
|
long id = userAccountsApi.createNewAccount(accountName, instanceUrl, userDetails.getUsername(), loginToken, "");
|
|
|
|
UserAccount account = userAccountsApi.getAccountById((int) id);
|
|
|
|
AppUtil.switchToAccount(AddNewAccountActivity.this, account);
|
2020-08-04 22:50:04 +02:00
|
|
|
Toasty.success(ctx, getResources().getString(R.string.accountAddedMessage));
|
|
|
|
finish();
|
2021-04-13 20:56:50 +02:00
|
|
|
|
2020-08-04 22:50:04 +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
|
|
|
UserAccount account = userAccountsApi.getAccountByName(accountName);
|
|
|
|
if(account.isLoggedIn()) {
|
|
|
|
Toasty.warning(ctx, getResources().getString(R.string.accountAlreadyExistsError));
|
|
|
|
AppUtil.switchToAccount(ctx, account);
|
|
|
|
} else {
|
|
|
|
userAccountsApi.updateTokenByAccountName(accountName, loginToken);
|
|
|
|
userAccountsApi.login(account.getAccountId());
|
|
|
|
AppUtil.switchToAccount(AddNewAccountActivity.this, account);
|
|
|
|
}
|
|
|
|
finish();
|
2020-08-04 22:50:04 +02:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 401:
|
|
|
|
|
2020-09-04 16:33:37 +02:00
|
|
|
Toasty.error(ctx, getResources().getString(R.string.unauthorizedApiError));
|
2020-08-04 22:50:04 +02:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
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
|
|
|
Toasty.error(ctx, getResources().getString(R.string.genericApiError, response.code()));
|
2020-08-04 22:50:04 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onFailure(@NonNull Call<UserInfo> call, @NonNull Throwable t) {
|
|
|
|
|
|
|
|
Log.e("onFailure", t.toString());
|
2020-09-04 16:33:37 +02:00
|
|
|
Toasty.error(ctx, getResources().getString(R.string.genericError));
|
2020-08-04 22:50:04 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
private void initCloseListener() {
|
|
|
|
|
|
|
|
onClickListener = view -> finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|