2020-10-31 18:24:52 +01:00
|
|
|
package app.fedilab.fedilabtube;
|
2020-11-04 18:39:45 +01:00
|
|
|
/* Copyright 2020 Thomas Schneider
|
|
|
|
*
|
|
|
|
* This file is a part of TubeLab
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it under the terms of the
|
|
|
|
* GNU General Public License as published by the Free Software Foundation; either version 3 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* TubeLab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
|
|
|
|
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
|
|
* Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with TubeLab; if not,
|
|
|
|
* see <http://www.gnu.org/licenses>. */
|
2020-11-11 10:34:28 +01:00
|
|
|
|
2020-11-01 18:34:53 +01:00
|
|
|
import android.Manifest;
|
|
|
|
import android.app.Activity;
|
2020-11-04 18:39:45 +01:00
|
|
|
import android.content.Context;
|
2020-11-01 18:34:53 +01:00
|
|
|
import android.content.Intent;
|
2020-11-04 18:39:45 +01:00
|
|
|
import android.content.SharedPreferences;
|
2020-11-01 18:34:53 +01:00
|
|
|
import android.content.pm.PackageManager;
|
|
|
|
import android.net.Uri;
|
2020-10-31 18:24:52 +01:00
|
|
|
import android.os.Bundle;
|
2020-11-01 18:34:53 +01:00
|
|
|
import android.os.Handler;
|
|
|
|
import android.os.Looper;
|
2020-11-04 18:39:45 +01:00
|
|
|
import android.view.Menu;
|
2020-10-31 18:24:52 +01:00
|
|
|
import android.view.MenuItem;
|
|
|
|
import android.view.View;
|
2020-11-04 18:39:45 +01:00
|
|
|
import android.widget.AdapterView;
|
|
|
|
import android.widget.ArrayAdapter;
|
2020-10-31 18:24:52 +01:00
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
import androidx.appcompat.app.AppCompatActivity;
|
2020-11-04 18:39:45 +01:00
|
|
|
import androidx.appcompat.widget.SwitchCompat;
|
2020-11-01 18:34:53 +01:00
|
|
|
import androidx.core.app.ActivityCompat;
|
|
|
|
import androidx.core.content.ContextCompat;
|
|
|
|
import androidx.documentfile.provider.DocumentFile;
|
2020-11-04 18:39:45 +01:00
|
|
|
import androidx.work.WorkManager;
|
2020-11-01 18:34:53 +01:00
|
|
|
|
|
|
|
import com.bumptech.glide.Glide;
|
|
|
|
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
|
|
|
|
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
|
|
|
|
import com.bumptech.glide.request.RequestOptions;
|
|
|
|
|
2020-11-04 18:39:45 +01:00
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
2020-10-31 18:24:52 +01:00
|
|
|
import app.fedilab.fedilabtube.client.RetrofitPeertubeAPI;
|
|
|
|
import app.fedilab.fedilabtube.client.entities.Error;
|
2020-11-04 18:39:45 +01:00
|
|
|
import app.fedilab.fedilabtube.client.entities.NotificationSettings;
|
2020-11-01 18:34:53 +01:00
|
|
|
import app.fedilab.fedilabtube.client.entities.UserMe;
|
2020-10-31 18:24:52 +01:00
|
|
|
import app.fedilab.fedilabtube.client.entities.UserSettings;
|
|
|
|
import app.fedilab.fedilabtube.databinding.ActivityMyAccountSettingsBinding;
|
2020-11-01 18:34:53 +01:00
|
|
|
import app.fedilab.fedilabtube.helper.Helper;
|
2020-11-04 18:39:45 +01:00
|
|
|
import app.fedilab.fedilabtube.worker.WorkHelper;
|
2020-10-31 18:24:52 +01:00
|
|
|
import es.dmoral.toasty.Toasty;
|
|
|
|
|
2020-11-01 18:34:53 +01:00
|
|
|
import static app.fedilab.fedilabtube.PeertubeUploadActivity.MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE;
|
2020-11-04 18:39:45 +01:00
|
|
|
import static app.fedilab.fedilabtube.worker.WorkHelper.NOTIFICATION_WORKER;
|
2020-10-31 18:24:52 +01:00
|
|
|
|
|
|
|
public class MyAccountActivity extends AppCompatActivity {
|
|
|
|
|
2020-11-01 18:34:53 +01:00
|
|
|
private static final int PICK_IMAGE = 466;
|
2020-11-11 10:34:28 +01:00
|
|
|
ActivityMyAccountSettingsBinding binding;
|
2020-11-01 18:34:53 +01:00
|
|
|
private Uri inputData;
|
2020-11-11 10:34:28 +01:00
|
|
|
private String fileName;
|
2020-11-04 18:39:45 +01:00
|
|
|
private NotificationSettings notificationSettings;
|
2020-10-31 18:24:52 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
protected void onCreate(Bundle savedInstanceState) {
|
|
|
|
super.onCreate(savedInstanceState);
|
|
|
|
binding = ActivityMyAccountSettingsBinding.inflate(getLayoutInflater());
|
|
|
|
View view = binding.getRoot();
|
|
|
|
setContentView(view);
|
|
|
|
|
|
|
|
if (getSupportActionBar() != null)
|
|
|
|
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
2020-11-11 10:34:28 +01:00
|
|
|
if (MainActivity.userMe == null) {
|
|
|
|
finish();
|
|
|
|
return;
|
2020-10-31 18:24:52 +01:00
|
|
|
}
|
2020-11-11 10:34:28 +01:00
|
|
|
setTitle(String.format("@%s", MainActivity.userMe.getUsername()));
|
2020-10-31 18:24:52 +01:00
|
|
|
binding.displayname.setText(MainActivity.userMe.getAccount().getDisplayName());
|
|
|
|
binding.description.setText(MainActivity.userMe.getAccount().getDescription());
|
|
|
|
|
2020-11-04 18:39:45 +01:00
|
|
|
notificationSettings = MainActivity.userMe.getNotificationSettings();
|
|
|
|
initializeValues(notificationSettings.getAbuseStateChange(), binding.notifAbuseAcceptedApp, binding.notifAbuseAcceptedMail);
|
|
|
|
initializeValues(notificationSettings.getAbuseNewMessage(), binding.notifAbuseReceivedApp, binding.notifAbuseReceivedMail);
|
|
|
|
initializeValues(notificationSettings.getCommentMention(), binding.notifVideoMentionApp, binding.notifVideoMentionMail);
|
|
|
|
initializeValues(notificationSettings.getNewFollow(), binding.notifNewFollowersApp, binding.notifNewFollowersMail);
|
|
|
|
initializeValues(notificationSettings.getMyVideoImportFinished(), binding.notifVideoImportedApp, binding.notifVideoImportedMail);
|
|
|
|
initializeValues(notificationSettings.getMyVideoPublished(), binding.notifVideoPublishedApp, binding.notifVideoPublishedMail);
|
|
|
|
initializeValues(notificationSettings.getBlacklistOnMyVideo(), binding.notifBlockedApp, binding.notifBlockedMail);
|
|
|
|
initializeValues(notificationSettings.getNewCommentOnMyVideo(), binding.notifNewCommentApp, binding.notifNewCommentMail);
|
|
|
|
initializeValues(notificationSettings.getNewVideoFromSubscription(), binding.notifNewVideoApp, binding.notifNewVideoMail);
|
|
|
|
|
2020-11-11 10:34:28 +01:00
|
|
|
Helper.loadGiF(MyAccountActivity.this, MainActivity.userMe.getAccount().getAvatar() != null ? MainActivity.userMe.getAccount().getAvatar().getPath() : null, binding.profilePicture);
|
2020-11-01 18:34:53 +01:00
|
|
|
|
2020-11-04 18:39:45 +01:00
|
|
|
String[] refresh_array = getResources().getStringArray(R.array.refresh_time);
|
|
|
|
ArrayAdapter<String> refreshArray = new ArrayAdapter<>(MyAccountActivity.this,
|
|
|
|
android.R.layout.simple_spinner_dropdown_item, refresh_array);
|
|
|
|
binding.refreshTime.setAdapter(refreshArray);
|
|
|
|
|
|
|
|
SharedPreferences sharedpreferences = getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
|
|
|
int interval = sharedpreferences.getInt(Helper.NOTIFICATION_INTERVAL, 60);
|
|
|
|
binding.refreshTime.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
|
@Override
|
|
|
|
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
|
|
|
|
SharedPreferences.Editor editor = sharedpreferences.edit();
|
|
|
|
int time;
|
|
|
|
switch (position) {
|
|
|
|
case 1:
|
|
|
|
time = 15;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
time = 30;
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
time = 60;
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
time = 120;
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
time = 360;
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
time = 720;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
time = 0;
|
|
|
|
}
|
|
|
|
editor.putInt(Helper.NOTIFICATION_INTERVAL, time);
|
|
|
|
editor.apply();
|
|
|
|
WorkManager.getInstance(getApplicationContext()).cancelAllWorkByTag(NOTIFICATION_WORKER);
|
2020-11-11 10:34:28 +01:00
|
|
|
if (time > 0) {
|
2020-11-04 18:39:45 +01:00
|
|
|
WorkHelper.fetchNotifications(getApplication(), time);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onNothingSelected(AdapterView<?> parent) {
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
int position = 0;
|
|
|
|
switch (interval) {
|
|
|
|
case 0:
|
|
|
|
position = 0;
|
|
|
|
break;
|
|
|
|
case 15:
|
|
|
|
position = 1;
|
|
|
|
break;
|
|
|
|
case 30:
|
|
|
|
position = 2;
|
|
|
|
break;
|
|
|
|
case 60:
|
|
|
|
position = 3;
|
|
|
|
break;
|
|
|
|
case 120:
|
|
|
|
position = 4;
|
|
|
|
break;
|
|
|
|
case 360:
|
|
|
|
position = 5;
|
|
|
|
break;
|
|
|
|
case 720:
|
|
|
|
position = 6;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
binding.refreshTime.setSelection(position, false);
|
|
|
|
|
2020-11-11 10:34:28 +01:00
|
|
|
binding.selectFile.setOnClickListener(v -> {
|
2020-11-01 18:34:53 +01:00
|
|
|
if (ContextCompat.checkSelfPermission(MyAccountActivity.this, Manifest.permission.READ_EXTERNAL_STORAGE) !=
|
|
|
|
PackageManager.PERMISSION_GRANTED) {
|
|
|
|
ActivityCompat.requestPermissions(MyAccountActivity.this,
|
|
|
|
new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},
|
|
|
|
MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
|
|
|
|
return;
|
2020-10-31 18:24:52 +01:00
|
|
|
}
|
2020-11-01 18:34:53 +01:00
|
|
|
|
|
|
|
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
|
|
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
|
|
|
intent.setType("*/*");
|
|
|
|
String[] mimetypes = {"image/*"};
|
|
|
|
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
|
|
|
|
startActivityForResult(intent, PICK_IMAGE);
|
|
|
|
});
|
|
|
|
|
2020-11-04 18:39:45 +01:00
|
|
|
}
|
2020-11-01 18:34:53 +01:00
|
|
|
|
2020-11-04 18:39:45 +01:00
|
|
|
@Override
|
|
|
|
public boolean onCreateOptionsMenu(@NotNull Menu menu) {
|
|
|
|
getMenuInflater().inflate(R.menu.main_my_account, menu);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public boolean onOptionsItemSelected(MenuItem item) {
|
|
|
|
if (item.getItemId() == android.R.id.home) {
|
|
|
|
finish();
|
|
|
|
return true;
|
|
|
|
} else if (item.getItemId() == R.id.action_validate) {
|
|
|
|
item.setEnabled(false);
|
2020-11-01 18:34:53 +01:00
|
|
|
new Thread(() -> {
|
|
|
|
UserSettings userSettings = new UserSettings();
|
2020-11-04 18:39:45 +01:00
|
|
|
userSettings.setNotificationSettings(notificationSettings);
|
2020-11-11 10:34:28 +01:00
|
|
|
if (binding.displayname.getText() != null) {
|
2020-11-01 18:34:53 +01:00
|
|
|
userSettings.setDisplayName(binding.displayname.getText().toString().trim());
|
|
|
|
}
|
2020-11-11 10:34:28 +01:00
|
|
|
if (binding.description.getText() != null) {
|
2020-11-01 18:34:53 +01:00
|
|
|
userSettings.setDescription(binding.description.getText().toString().trim());
|
|
|
|
}
|
2020-11-11 10:34:28 +01:00
|
|
|
if (inputData != null) {
|
2020-11-01 18:34:53 +01:00
|
|
|
userSettings.setAvatarfile(inputData);
|
|
|
|
userSettings.setFileName(fileName);
|
|
|
|
}
|
|
|
|
try {
|
|
|
|
RetrofitPeertubeAPI api = new RetrofitPeertubeAPI(MyAccountActivity.this);
|
|
|
|
UserMe.AvatarResponse avatarResponse = api.updateUser(userSettings);
|
|
|
|
MainActivity.userMe.getAccount().setDisplayName(binding.displayname.getText().toString().trim());
|
|
|
|
MainActivity.userMe.getAccount().setDescription(binding.description.getText().toString().trim());
|
2020-11-11 10:34:28 +01:00
|
|
|
if (avatarResponse != null && avatarResponse.getAvatar() != null) {
|
2020-11-01 18:34:53 +01:00
|
|
|
MainActivity.userMe.getAccount().setAvatar(avatarResponse.getAvatar());
|
|
|
|
}
|
2020-11-04 18:39:45 +01:00
|
|
|
|
2020-11-01 18:34:53 +01:00
|
|
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
|
|
|
Runnable myRunnable = () -> {
|
|
|
|
Toasty.info(MyAccountActivity.this, getString(R.string.account_updated), Toasty.LENGTH_LONG).show();
|
2020-11-04 18:39:45 +01:00
|
|
|
item.setEnabled(true);
|
2020-11-01 18:34:53 +01:00
|
|
|
};
|
|
|
|
mainHandler.post(myRunnable);
|
|
|
|
} catch (Exception | Error e) {
|
|
|
|
Handler mainHandler = new Handler(Looper.getMainLooper());
|
|
|
|
Runnable myRunnable = () -> {
|
|
|
|
Toasty.error(MyAccountActivity.this, getString(R.string.toast_error), Toasty.LENGTH_LONG).show();
|
2020-11-04 18:39:45 +01:00
|
|
|
item.setEnabled(true);
|
2020-11-01 18:34:53 +01:00
|
|
|
};
|
|
|
|
mainHandler.post(myRunnable);
|
|
|
|
}
|
|
|
|
}).start();
|
2020-10-31 18:24:52 +01:00
|
|
|
}
|
|
|
|
return super.onOptionsItemSelected(item);
|
|
|
|
}
|
2020-11-01 18:34:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
|
super.onActivityResult(requestCode, resultCode, data);
|
|
|
|
if (requestCode == PICK_IMAGE && resultCode == Activity.RESULT_OK) {
|
|
|
|
if (data == null || data.getData() == null) {
|
|
|
|
Toasty.error(MyAccountActivity.this, getString(R.string.toot_select_image_error), Toast.LENGTH_LONG).show();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
inputData = data.getData();
|
|
|
|
DocumentFile documentFile = DocumentFile.fromSingleUri(this, inputData);
|
|
|
|
if (documentFile != null) {
|
|
|
|
fileName = documentFile.getName();
|
|
|
|
}
|
|
|
|
Glide.with(MyAccountActivity.this)
|
|
|
|
.load(inputData)
|
|
|
|
.thumbnail(0.1f)
|
|
|
|
.apply(new RequestOptions().transform(new CenterCrop(), new RoundedCorners(10)))
|
|
|
|
.into(binding.profilePicture);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2020-11-04 18:39:45 +01:00
|
|
|
|
|
|
|
private void initializeValues(int value, SwitchCompat app, SwitchCompat email) {
|
|
|
|
switch (value) {
|
|
|
|
case 1:
|
|
|
|
app.setChecked(true);
|
|
|
|
email.setChecked(false);
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
app.setChecked(false);
|
|
|
|
email.setChecked(true);
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
app.setChecked(true);
|
|
|
|
email.setChecked(true);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
app.setChecked(false);
|
|
|
|
email.setChecked(false);
|
|
|
|
}
|
|
|
|
app.setOnCheckedChangeListener((compoundButton, checked) -> {
|
|
|
|
int id = app.getId();
|
|
|
|
if (id == R.id.notif_new_video_app) {
|
|
|
|
notificationSettings.setNewVideoFromSubscription(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_new_comment_app) {
|
|
|
|
notificationSettings.setNewCommentOnMyVideo(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_blocked_app) {
|
|
|
|
notificationSettings.setBlacklistOnMyVideo(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_video_published_app) {
|
|
|
|
notificationSettings.setMyVideoPublished(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_video_imported_app) {
|
|
|
|
notificationSettings.setMyVideoImportFinished(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_new_followers_app) {
|
|
|
|
notificationSettings.setNewFollow(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_video_mention_app) {
|
|
|
|
notificationSettings.setCommentMention(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_abuse_received_app) {
|
|
|
|
notificationSettings.setAbuseNewMessage(getNewAppCheckedValue(checked, email));
|
|
|
|
} else if (id == R.id.notif_abuse_accepted_app) {
|
|
|
|
notificationSettings.setAbuseStateChange(getNewAppCheckedValue(checked, email));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
email.setOnCheckedChangeListener((compoundButtonMail, checkedMail) -> {
|
|
|
|
int id = email.getId();
|
|
|
|
if (id == R.id.notif_new_video_mail) {
|
|
|
|
notificationSettings.setNewVideoFromSubscription(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_new_comment_mail) {
|
|
|
|
notificationSettings.setNewCommentOnMyVideo(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_blocked_mail) {
|
|
|
|
notificationSettings.setBlacklistOnMyVideo(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_video_published_mail) {
|
|
|
|
notificationSettings.setMyVideoPublished(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_video_imported_mail) {
|
|
|
|
notificationSettings.setMyVideoImportFinished(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_new_followers_mail) {
|
|
|
|
notificationSettings.setNewFollow(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_video_mention_mail) {
|
|
|
|
notificationSettings.setCommentMention(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_abuse_received_mail) {
|
|
|
|
notificationSettings.setAbuseNewMessage(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
} else if (id == R.id.notif_abuse_accepted_mail) {
|
|
|
|
notificationSettings.setAbuseStateChange(getNewMailCheckedValue(checkedMail, app));
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2020-11-11 10:34:28 +01:00
|
|
|
private int getNewAppCheckedValue(boolean checked, SwitchCompat email) {
|
2020-11-04 18:39:45 +01:00
|
|
|
int newValue;
|
2020-11-11 10:34:28 +01:00
|
|
|
if (checked && email.isChecked()) {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 3;
|
2020-11-11 10:34:28 +01:00
|
|
|
} else if (!checked && email.isChecked()) {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 2;
|
2020-11-11 10:34:28 +01:00
|
|
|
} else if (checked && !email.isChecked()) {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 1;
|
2020-11-11 10:34:28 +01:00
|
|
|
} else {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 0;
|
|
|
|
}
|
|
|
|
return newValue;
|
|
|
|
}
|
|
|
|
|
2020-11-11 10:34:28 +01:00
|
|
|
private int getNewMailCheckedValue(boolean checked, SwitchCompat app) {
|
2020-11-04 18:39:45 +01:00
|
|
|
int newValue;
|
2020-11-11 10:34:28 +01:00
|
|
|
if (checked && app.isChecked()) {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 3;
|
2020-11-11 10:34:28 +01:00
|
|
|
} else if (!checked && app.isChecked()) {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 1;
|
2020-11-11 10:34:28 +01:00
|
|
|
} else if (checked && !app.isChecked()) {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 2;
|
2020-11-11 10:34:28 +01:00
|
|
|
} else {
|
2020-11-04 18:39:45 +01:00
|
|
|
newValue = 0;
|
|
|
|
}
|
|
|
|
return newValue;
|
|
|
|
}
|
2020-10-31 18:24:52 +01:00
|
|
|
}
|