Compare commits
No commits in common. "main" and "release-4.0" have entirely different histories.
main
...
release-4.
@ -1,22 +1,22 @@
|
|||||||
---
|
## # What do you want to address?
|
||||||
|
<!-- This step is required; examples are shown below -->
|
||||||
|
|
||||||
name: "Bug"
|
- [ ] Bug
|
||||||
about: "Something isn't working"
|
- [ ] Feature
|
||||||
labels:
|
- [ ] Suggestion
|
||||||
|
|
||||||
- Bug
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## # Describe your matter briefly
|
## # Describe your matter briefly
|
||||||
|
<!-- This step is required. -->
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
##### What did you expect?
|
##### What did you expect? <!-- Useful when addressing bugs -->
|
||||||
---
|
---
|
||||||
|
<!-- This step is optional. -->
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
##### Some additional details
|
##### Some additional details <!-- Useful, when we are trying to reproduce a bug -->
|
||||||
---
|
---
|
||||||
|
<!-- This step is optional; an example is shown below -->
|
||||||
|
|
||||||
* The version of **Gitea** you are using:
|
* The version of **Gitea** you are using:
|
||||||
* The version of **GitNex** you are using:
|
* The version of **GitNex** you are using:
|
||||||
@ -34,4 +34,4 @@ labels:
|
|||||||
- [ ] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
|
- [ ] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<!-- Thank you for your time. -->
|
#### Thank you for your time.
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
name: "Feature"
|
|
||||||
about: "A new feature or an enhancement to an existing feature"
|
|
||||||
labels:
|
|
||||||
|
|
||||||
- Feature
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## # Describe your matter briefly
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
- [ ] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<!-- Thank you for your time. -->
|
|
@ -1,37 +0,0 @@
|
|||||||
---
|
|
||||||
|
|
||||||
name: "Suggestion"
|
|
||||||
about: "A general suggestion"
|
|
||||||
labels:
|
|
||||||
|
|
||||||
- Suggestion
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## # Describe your matter briefly
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
##### What did you expect?
|
|
||||||
---
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
##### Some additional details
|
|
||||||
---
|
|
||||||
|
|
||||||
* The version of **Gitea** you are using:
|
|
||||||
* The version of **GitNex** you are using:
|
|
||||||
* Source of installation (Play Store, F-Droid, APK):
|
|
||||||
* Current android version and phone model/manufacturer:
|
|
||||||
* The type of certificate your instance is using (self-signed, signed):
|
|
||||||
* How you used to log in (via password or token):
|
|
||||||
<br>
|
|
||||||
|
|
||||||
##### We would appreciate some screenshots or stacktrace's, but this is also not required.
|
|
||||||
---
|
|
||||||
<!-- Screenshots and stacktrace's can go here. -->
|
|
||||||
<br><br>
|
|
||||||
|
|
||||||
- [ ] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md).
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<!-- Thank you for your time. -->
|
|
@ -17,7 +17,7 @@ on_setup:
|
|||||||
- ./scripts/add-commit-status.sh
|
- ./scripts/add-commit-status.sh
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: nextcloudci/android8:android-61
|
image: nextcloudci/android:android-54
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
@ -30,7 +30,7 @@ build:
|
|||||||
expire_in: 15 minutes
|
expire_in: 15 minutes
|
||||||
|
|
||||||
sign:
|
sign:
|
||||||
image: nextcloudci/android8:android-61
|
image: nextcloudci/android:android-54
|
||||||
stage: sign
|
stage: sign
|
||||||
only:
|
only:
|
||||||
- main
|
- main
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[](https://www.gnu.org/licenses/gpl-3.0) [](https://gitlab.com/mmarif4u/gitnex-ci/-/pipelines) [](https://codeberg.org/gitnex/GitNex/releases) [](https://crowdin.com/project/gitnex) [](https://discord.gg/FbSS4rf)
|
[](https://www.gnu.org/licenses/gpl-3.0) [](https://gitlab.com/opyale/gitnex/-/pipelines) [](https://codeberg.org/gitnex/GitNex/releases) [](https://crowdin.com/project/gitnex) [](https://discord.gg/FbSS4rf)
|
||||||
|
|
||||||
[<img alt="Become a Patreon" src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="40"/>](https://www.patreon.com/mmarif)
|
[<img alt="Become a Patroen" src="https://c5.patreon.com/external/logo/become_a_patron_button@2x.png" height="40"/>](https://www.patreon.com/mmarif)
|
||||||
|
|
||||||
# GitNex - Android client for Gitea
|
# GitNex - Android client for Gitea
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ GitNex is a free/paid, open-source Android client for Git repository management
|
|||||||
GitNex is licensed under GPLv3 License. See the LICENSE file for the full license text. **No trackers are used** and source code is available here for anyone to audit.
|
GitNex is licensed under GPLv3 License. See the LICENSE file for the full license text. **No trackers are used** and source code is available here for anyone to audit.
|
||||||
|
|
||||||
## Downloads
|
## Downloads
|
||||||
[<img alt='Get it on F-Droid' src='https://gitlab.com/fdroid/artwork/raw/master/badge/get-it-on.png' height="80"/>](https://f-droid.org/en/packages/org.mian.gitnex/)
|
[<img alt='Get it on F-droid' src='https://gitlab.com/fdroid/artwork/raw/master/badge/get-it-on.png' height="80"/>](https://f-droid.org/en/packages/org.mian.gitnex/)
|
||||||
[<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height="80"/>](https://play.google.com/store/apps/details?id=org.mian.gitnex.pro)
|
[<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height="80"/>](https://play.google.com/store/apps/details?id=org.mian.gitnex.pro)
|
||||||
[<img alt='Download builds and releases' src='https://codeberg.org/gitnex/GitNex/raw/branch/main/assets/apk-badge.png' height="82"/>](https://cloud.swatian.com/s/DN7E5xxtaw4fRbE)
|
[<img alt='Download builds and releases' src='https://codeberg.org/gitnex/GitNex/raw/branch/main/assets/apk-badge.png' height="82"/>](https://cloud.swatian.com/s/DN7E5xxtaw4fRbE)
|
||||||
|
|
||||||
@ -57,6 +57,8 @@ We use [Crowdin](https://crowdin.com/project/gitnex) for translation. If your la
|
|||||||
|
|
||||||
[Wiki](https://codeberg.org/gitnex/GitNex/wiki/Home)
|
[Wiki](https://codeberg.org/gitnex/GitNex/wiki/Home)
|
||||||
|
|
||||||
|
[Website Repository](https://gitlab.com/mmarif4u/gitnex-website)
|
||||||
|
|
||||||
[Troubleshoot Guide](https://codeberg.org/gitnex/GitNex/wiki/Troubleshoot-Guide)
|
[Troubleshoot Guide](https://codeberg.org/gitnex/GitNex/wiki/Troubleshoot-Guide)
|
||||||
|
|
||||||
[Faq](https://codeberg.org/gitnex/GitNex/wiki/FAQ)
|
[Faq](https://codeberg.org/gitnex/GitNex/wiki/FAQ)
|
||||||
|
@ -6,8 +6,8 @@ android {
|
|||||||
applicationId "org.mian.gitnex"
|
applicationId "org.mian.gitnex"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 415
|
versionCode 400
|
||||||
versionName "4.2.0"
|
versionName "4.0.0"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
@ -62,8 +62,8 @@ dependencies {
|
|||||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
implementation 'androidx.appcompat:appcompat:1.4.0-alpha03'
|
implementation 'androidx.appcompat:appcompat:1.4.0-alpha03'
|
||||||
implementation 'com.google.android.material:material:1.4.0'
|
implementation 'com.google.android.material:material:1.4.0'
|
||||||
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
|
implementation 'androidx.viewpager2:viewpager2:1.1.0-alpha01'
|
||||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
|
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
|
||||||
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
||||||
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
|
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
|
||||||
testImplementation 'junit:junit:4.13.2'
|
testImplementation 'junit:junit:4.13.2'
|
||||||
@ -109,7 +109,7 @@ dependencies {
|
|||||||
implementation "androidx.work:work-runtime:$work_version"
|
implementation "androidx.work:work-runtime:$work_version"
|
||||||
implementation "io.mikael:urlbuilder:2.0.9"
|
implementation "io.mikael:urlbuilder:2.0.9"
|
||||||
implementation "org.codeberg.gitnex-garage:emoji-java:v5.1.2"
|
implementation "org.codeberg.gitnex-garage:emoji-java:v5.1.2"
|
||||||
implementation "org.codeberg.gitnex:tea4j:1.0.24"
|
implementation "org.codeberg.gitnex:tea4j:1.0.16"
|
||||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:1.1.5"
|
||||||
implementation 'androidx.biometric:biometric:1.1.0'
|
implementation 'androidx.biometric:biometric:1.1.0'
|
||||||
implementation 'com.github.chrisvest:stormpot:2.4.2'
|
implementation 'com.github.chrisvest:stormpot:2.4.2'
|
||||||
|
@ -88,8 +88,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name=".activities.MainActivity"
|
android:name=".activities.MainActivity"
|
||||||
android:theme="@android:style/Theme.NoTitleBar"
|
android:theme="@android:style/Theme.NoTitleBar"
|
||||||
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|uiMode|keyboard|keyboardHidden|navigation"
|
android:configChanges="orientation|screenSize|smallestScreenSize|density|screenLayout|uiMode|keyboard|keyboardHidden|navigation">
|
||||||
android:exported="true">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
@ -174,8 +173,7 @@
|
|||||||
android:name=".activities.DeepLinksActivity"
|
android:name=".activities.DeepLinksActivity"
|
||||||
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
android:theme="@android:style/Theme.Translucent.NoTitleBar"
|
||||||
android:noHistory="true"
|
android:noHistory="true"
|
||||||
android:launchMode="singleTask"
|
android:launchMode="singleTask">
|
||||||
android:exported="true">
|
|
||||||
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.VIEW" />
|
<action android:name="android.intent.action.VIEW" />
|
||||||
@ -189,10 +187,6 @@
|
|||||||
<data android:host="code.obermui.de" />
|
<data android:host="code.obermui.de" />
|
||||||
<data android:host="git.fsfe.org" />
|
<data android:host="git.fsfe.org" />
|
||||||
<data android:host="opendev.org" />
|
<data android:host="opendev.org" />
|
||||||
<data android:host="git.shihaam.dev" />
|
|
||||||
<data android:host="git.athfan.com" />
|
|
||||||
<data android:host="git.athfan.dev" />
|
|
||||||
|
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
||||||
</activity>
|
</activity>
|
||||||
|
@ -10,7 +10,6 @@ import org.mian.gitnex.helpers.Authorization;
|
|||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author qwerty287
|
* Author qwerty287
|
||||||
@ -60,43 +59,4 @@ public class PullRequestActions {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void updatePr(Context context, String repoOwner, String repoName, String index, Boolean rebase) {
|
|
||||||
String strategy;
|
|
||||||
if(rebase == null) {
|
|
||||||
strategy = null;
|
|
||||||
}
|
|
||||||
else if(!rebase) {
|
|
||||||
strategy = "merge";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
strategy = "rebase";
|
|
||||||
}
|
|
||||||
RetrofitClient.getApiInterface(context).updatePullRequest(Authorization.get(context), repoOwner, repoName, Integer.parseInt(index), strategy)
|
|
||||||
.enqueue(new Callback<Void>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call call, @NonNull Response response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
Toasty.success(context, context.getString(R.string.updatePrSuccess));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if(response.code() == 403) {
|
|
||||||
Toasty.error(context, context.getString(R.string.authorizeError));
|
|
||||||
}
|
|
||||||
else if(response.code() == 409) {
|
|
||||||
Toasty.error(context, context.getString(R.string.updatePrConflict));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Toasty.error(context, context.getString(R.string.genericError));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call call, @NonNull Throwable t) {
|
|
||||||
Toasty.error(context, context.getString(R.string.genericError));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ public class AddCollaboratorToRepositoryActivity extends BaseActivity {
|
|||||||
|
|
||||||
Call<UserSearch> call = RetrofitClient
|
Call<UserSearch> call = RetrofitClient
|
||||||
.getApiInterface(appCtx)
|
.getApiInterface(appCtx)
|
||||||
.getUserBySearch(Authorization.get(ctx), searchKeyword, 10, 1);
|
.getUserBySearch(Authorization.get(ctx), searchKeyword, 10);
|
||||||
|
|
||||||
call.enqueue(new Callback<UserSearch>() {
|
call.enqueue(new Callback<UserSearch>() {
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ public class AddNewAccountActivity extends BaseActivity {
|
|||||||
.setMessage(getResources().getString(R.string.versionUnsupportedOld, version.getVersion())).setIcon(R.drawable.ic_warning)
|
.setMessage(getResources().getString(R.string.versionUnsupportedOld, version.getVersion())).setIcon(R.drawable.ic_warning)
|
||||||
.setCancelable(true);
|
.setCancelable(true);
|
||||||
|
|
||||||
alertDialogBuilder.setNeutralButton(getString(R.string.cancelButton), (dialog, which) -> {
|
alertDialogBuilder.setNegativeButton(getString(R.string.cancelButton), (dialog, which) -> {
|
||||||
|
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
});
|
});
|
||||||
|
@ -110,7 +110,7 @@ public class AddNewTeamMemberActivity extends BaseActivity {
|
|||||||
|
|
||||||
public void loadUserSearchList(String searchKeyword, String teamId) {
|
public void loadUserSearchList(String searchKeyword, String teamId) {
|
||||||
|
|
||||||
Call<UserSearch> call = RetrofitClient.getApiInterface(ctx).getUserBySearch(Authorization.get(ctx), searchKeyword, 10, 1);
|
Call<UserSearch> call = RetrofitClient.getApiInterface(ctx).getUserBySearch(Authorization.get(ctx), searchKeyword, 10);
|
||||||
|
|
||||||
mProgressBar.setVisibility(View.VISIBLE);
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
@ -274,14 +274,13 @@ public class DeepLinksActivity extends BaseActivity {
|
|||||||
goToRepoSection(currentInstance, instanceToken, data.getPathSegments().get(0), data.getPathSegments().get(1), "newRelease"), 500);
|
goToRepoSection(currentInstance, instanceToken, data.getPathSegments().get(0), data.getPathSegments().get(1), "newRelease"), 500);
|
||||||
}
|
}
|
||||||
else if(data.getPathSegments().get(2).equals("releases")) { // releases
|
else if(data.getPathSegments().get(2).equals("releases")) { // releases
|
||||||
if(data.getPathSegments().size() == 5) {
|
new Handler(Looper.getMainLooper()).postDelayed(() ->
|
||||||
if(data.getPathSegments().get(2).equals("releases") && data.getPathSegments().get(3).equals("tag")) {
|
goToRepoSection(currentInstance, instanceToken, data.getPathSegments().get(0), data.getPathSegments().get(1), "releases"), 500);
|
||||||
|
}
|
||||||
|
else if(data.getPathSegments().get(2).equals("releases") && data.getPathSegments().get(3).equals("tag") && data.getPathSegments().size() == 5) { // release
|
||||||
repoIntent.putExtra("releaseTagName", data.getLastPathSegment());
|
repoIntent.putExtra("releaseTagName", data.getLastPathSegment());
|
||||||
}
|
new Handler(Looper.getMainLooper()).postDelayed(() ->
|
||||||
}
|
goToRepoSection(currentInstance, instanceToken, data.getPathSegments().get(0), data.getPathSegments().get(1), "releases"), 500);
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(
|
|
||||||
() -> goToRepoSection(currentInstance, instanceToken, data.getPathSegments().get(0), data.getPathSegments().get(1),
|
|
||||||
"releases"), 500);
|
|
||||||
}
|
}
|
||||||
else if(data.getPathSegments().get(2).equals("labels")) { // labels
|
else if(data.getPathSegments().get(2).equals("labels")) { // labels
|
||||||
new Handler(Looper.getMainLooper()).postDelayed(() ->
|
new Handler(Looper.getMainLooper()).postDelayed(() ->
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package org.mian.gitnex.activities;
|
package org.mian.gitnex.activities;
|
||||||
|
|
||||||
import android.app.Dialog;
|
import android.app.Dialog;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
@ -589,7 +590,7 @@ public class IssueDetailActivity extends BaseActivity implements LabelsListAdapt
|
|||||||
String issueNumber_ = "<font color='" + ResourcesCompat.getColor(getResources(), R.color.lightGray, null) + "'>" + appCtx.getResources()
|
String issueNumber_ = "<font color='" + ResourcesCompat.getColor(getResources(), R.color.lightGray, null) + "'>" + appCtx.getResources()
|
||||||
.getString(R.string.hash) + singleIssue.getNumber() + "</font>";
|
.getString(R.string.hash) + singleIssue.getNumber() + "</font>";
|
||||||
viewBinding.issueTitle.setText(HtmlCompat.fromHtml(issueNumber_ + " " + EmojiParser.parseToUnicode(singleIssue.getTitle()), HtmlCompat.FROM_HTML_MODE_LEGACY));
|
viewBinding.issueTitle.setText(HtmlCompat.fromHtml(issueNumber_ + " " + EmojiParser.parseToUnicode(singleIssue.getTitle()), HtmlCompat.FROM_HTML_MODE_LEGACY));
|
||||||
String cleanIssueDescription = singleIssue.getBody().trim().replace("\n", "<br/>");
|
String cleanIssueDescription = singleIssue.getBody().trim();
|
||||||
|
|
||||||
viewBinding.assigneeAvatar.setOnClickListener(loginId -> {
|
viewBinding.assigneeAvatar.setOnClickListener(loginId -> {
|
||||||
Intent intent = new Intent(ctx, ProfileActivity.class);
|
Intent intent = new Intent(ctx, ProfileActivity.class);
|
||||||
|
@ -280,7 +280,7 @@ public class LoginActivity extends BaseActivity {
|
|||||||
.setIcon(R.drawable.ic_warning)
|
.setIcon(R.drawable.ic_warning)
|
||||||
.setCancelable(true);
|
.setCancelable(true);
|
||||||
|
|
||||||
alertDialogBuilder.setNeutralButton(getString(R.string.cancelButton), (dialog, which) -> {
|
alertDialogBuilder.setNegativeButton(getString(R.string.cancelButton), (dialog, which) -> {
|
||||||
|
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
enableProcessButton();
|
enableProcessButton();
|
||||||
|
@ -3,7 +3,6 @@ package org.mian.gitnex.activities;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.Menu;
|
|
||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -16,31 +15,23 @@ import androidx.viewpager2.adapter.FragmentStateAdapter;
|
|||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.viewpager2.widget.ViewPager2;
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import com.google.android.material.tabs.TabLayoutMediator;
|
import com.google.android.material.tabs.TabLayoutMediator;
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
|
||||||
import org.mian.gitnex.fragments.BottomSheetUserProfileFragment;
|
|
||||||
import org.mian.gitnex.fragments.profile.DetailFragment;
|
import org.mian.gitnex.fragments.profile.DetailFragment;
|
||||||
import org.mian.gitnex.fragments.profile.FollowersFragment;
|
import org.mian.gitnex.fragments.profile.FollowersFragment;
|
||||||
import org.mian.gitnex.fragments.profile.FollowingFragment;
|
import org.mian.gitnex.fragments.profile.FollowingFragment;
|
||||||
import org.mian.gitnex.fragments.profile.OrganizationsFragment;
|
import org.mian.gitnex.fragments.profile.OrganizationsFragment;
|
||||||
import org.mian.gitnex.fragments.profile.RepositoriesFragment;
|
import org.mian.gitnex.fragments.profile.RepositoriesFragment;
|
||||||
import org.mian.gitnex.fragments.profile.StarredRepositoriesFragment;
|
import org.mian.gitnex.fragments.profile.StarredRepositoriesFragment;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Callback;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ProfileActivity extends BaseActivity implements BottomSheetUserProfileFragment.BottomSheetListener {
|
public class ProfileActivity extends BaseActivity {
|
||||||
|
|
||||||
private String username;
|
private String username;
|
||||||
private boolean following;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
@ -103,85 +94,8 @@ public class ProfileActivity extends BaseActivity implements BottomSheetUserProf
|
|||||||
((TextView) tabViewChild).setTypeface(myTypeface);
|
((TextView) tabViewChild).setTypeface(myTypeface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!username.equals(tinyDB.getString("userLogin"))) {
|
|
||||||
checkFollowStatus();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onButtonClicked(String text) {
|
|
||||||
if(text.equals("follow")) {
|
|
||||||
followUnfollow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void checkFollowStatus() {
|
|
||||||
RetrofitClient.getApiInterface(this).checkFollowing(Authorization.get(this), username).enqueue(new Callback<JsonElement>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<JsonElement> call, @NonNull Response<JsonElement> response) {
|
|
||||||
if(response.code() == 204) {
|
|
||||||
following = true;
|
|
||||||
}
|
|
||||||
else if(response.code() == 404) {
|
|
||||||
following = false;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
following = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<JsonElement> call, @NonNull Throwable t) {
|
|
||||||
following = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void followUnfollow() {
|
|
||||||
Call<JsonElement> call;
|
|
||||||
if (following) {
|
|
||||||
call = RetrofitClient.getApiInterface(this).unfollowUser(Authorization.get(this), username);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
call = RetrofitClient.getApiInterface(this).followUser(Authorization.get(this), username);
|
|
||||||
}
|
|
||||||
|
|
||||||
call.enqueue(new Callback<JsonElement>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<JsonElement> call, @NonNull Response<JsonElement> response) {
|
|
||||||
if (response.isSuccessful()) {
|
|
||||||
following = !following;
|
|
||||||
if (following) {
|
|
||||||
Toasty.success(ProfileActivity.this, String.format(getString(R.string.nowFollowUser), username));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Toasty.success(ProfileActivity.this, String.format(getString(R.string.unfollowedUser), username));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (following) {
|
|
||||||
Toasty.error(ProfileActivity.this, getString(R.string.unfollowingFailed));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Toasty.error(ProfileActivity.this, getString(R.string.followingFailed));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<JsonElement> call, @NonNull Throwable t) {
|
|
||||||
if (following) {
|
|
||||||
Toasty.error(ProfileActivity.this, getString(R.string.unfollowingFailed));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Toasty.error(ProfileActivity.this, getString(R.string.followingFailed));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ViewPagerAdapter extends FragmentStateAdapter {
|
public class ViewPagerAdapter extends FragmentStateAdapter {
|
||||||
|
|
||||||
@ -222,21 +136,8 @@ public class ProfileActivity extends BaseActivity implements BottomSheetUserProf
|
|||||||
finish();
|
finish();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(id == R.id.genericMenu) {
|
|
||||||
new BottomSheetUserProfileFragment(following).show(getSupportFragmentManager(), "userProfileBottomSheet");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
|
||||||
if(!username.equals(tinyDB.getString("userLogin"))) {
|
|
||||||
getMenuInflater().inflate(R.menu.generic_nav_dotted_menu, menu);
|
|
||||||
}
|
|
||||||
return super.onCreateOptionsMenu(menu);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package org.mian.gitnex.activities;
|
package org.mian.gitnex.activities;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.ClipData;
|
import android.content.ClipData;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
@ -29,7 +29,6 @@ import androidx.viewpager.widget.ViewPager;
|
|||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import org.gitnex.tea4j.models.Branches;
|
import org.gitnex.tea4j.models.Branches;
|
||||||
import org.gitnex.tea4j.models.Milestones;
|
|
||||||
import org.gitnex.tea4j.models.UserRepositories;
|
import org.gitnex.tea4j.models.UserRepositories;
|
||||||
import org.gitnex.tea4j.models.WatchInfo;
|
import org.gitnex.tea4j.models.WatchInfo;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
@ -71,7 +70,6 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
private FragmentRefreshListenerPr fragmentRefreshListenerPr;
|
private FragmentRefreshListenerPr fragmentRefreshListenerPr;
|
||||||
private FragmentRefreshListenerMilestone fragmentRefreshListenerMilestone;
|
private FragmentRefreshListenerMilestone fragmentRefreshListenerMilestone;
|
||||||
private FragmentRefreshListenerFiles fragmentRefreshListenerFiles;
|
private FragmentRefreshListenerFiles fragmentRefreshListenerFiles;
|
||||||
private FragmentRefreshListenerFilterIssuesByMilestone fragmentRefreshListenerFilterIssuesByMilestone;
|
|
||||||
|
|
||||||
private String repositoryOwner;
|
private String repositoryOwner;
|
||||||
private String repositoryName;
|
private String repositoryName;
|
||||||
@ -443,9 +441,6 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
|
|
||||||
startActivity(new Intent(RepoDetailActivity.this, CreateFileActivity.class));
|
startActivity(new Intent(RepoDetailActivity.this, CreateFileActivity.class));
|
||||||
break;
|
break;
|
||||||
case "filterByMilestone":
|
|
||||||
filterIssuesByMilestone();
|
|
||||||
break;
|
|
||||||
case "openIssues":
|
case "openIssues":
|
||||||
|
|
||||||
if(getFragmentRefreshListener() != null) {
|
if(getFragmentRefreshListener() != null) {
|
||||||
@ -499,73 +494,8 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void filterIssuesByMilestone() {
|
|
||||||
|
|
||||||
Dialog progressDialog = new Dialog(this);
|
|
||||||
progressDialog.setContentView(R.layout.custom_progress_loader);
|
|
||||||
progressDialog.show();
|
|
||||||
|
|
||||||
Call<List<Milestones>> call = RetrofitClient
|
|
||||||
.getApiInterface(ctx)
|
|
||||||
.getMilestones(Authorization.get(ctx), repositoryOwner, repositoryName, 1, 50, "open");
|
|
||||||
|
|
||||||
call.enqueue(new Callback<List<Milestones>>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<List<Milestones>> call, @NonNull Response<List<Milestones>> response) {
|
|
||||||
|
|
||||||
progressDialog.hide();
|
|
||||||
if(response.code() == 200) {
|
|
||||||
|
|
||||||
Milestones milestones;
|
|
||||||
List<String> milestonesList = new ArrayList<>();
|
|
||||||
int selectedMilestone = 0;
|
|
||||||
assert response.body() != null;
|
|
||||||
|
|
||||||
milestonesList.add("All");
|
|
||||||
for(int i = 0; i < response.body().size(); i++) {
|
|
||||||
milestones = response.body().get(i);
|
|
||||||
milestonesList.add(milestones.getTitle());
|
|
||||||
}
|
|
||||||
|
|
||||||
for(int j = 0; j < milestonesList.size(); j++) {
|
|
||||||
if(tinyDB.getString("issueMilestoneFilterId").equals(milestonesList.get(j))) {
|
|
||||||
selectedMilestone = j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
AlertDialog.Builder pBuilder = new AlertDialog.Builder(ctx);
|
|
||||||
pBuilder.setTitle(R.string.selectMilestone);
|
|
||||||
|
|
||||||
pBuilder.setSingleChoiceItems(milestonesList.toArray(new String[0]), selectedMilestone, (dialogInterface, i) -> {
|
|
||||||
|
|
||||||
tinyDB.putString("issueMilestoneFilterId", milestonesList.get(i));
|
|
||||||
|
|
||||||
if(getFragmentRefreshListenerFilterIssuesByMilestone() != null) {
|
|
||||||
getFragmentRefreshListenerFilterIssuesByMilestone().onRefresh(milestonesList.get(i));
|
|
||||||
}
|
|
||||||
dialogInterface.dismiss();
|
|
||||||
});
|
|
||||||
|
|
||||||
pBuilder.setNeutralButton(R.string.cancelButton, null);
|
|
||||||
pBuilder.create().show();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<List<Milestones>> call, @NonNull Throwable t) {
|
|
||||||
progressDialog.hide();
|
|
||||||
Log.e("onFailure", t.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void chooseBranch() {
|
private void chooseBranch() {
|
||||||
|
|
||||||
Dialog progressDialog = new Dialog(this);
|
|
||||||
progressDialog.setContentView(R.layout.custom_progress_loader);
|
|
||||||
progressDialog.show();
|
|
||||||
|
|
||||||
Call<List<Branches>> call = RetrofitClient
|
Call<List<Branches>> call = RetrofitClient
|
||||||
.getApiInterface(ctx)
|
.getApiInterface(ctx)
|
||||||
.getBranches(Authorization.get(ctx), repositoryOwner, repositoryName);
|
.getBranches(Authorization.get(ctx), repositoryOwner, repositoryName);
|
||||||
@ -575,7 +505,6 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<List<Branches>> call, @NonNull Response<List<Branches>> response) {
|
public void onResponse(@NonNull Call<List<Branches>> call, @NonNull Response<List<Branches>> response) {
|
||||||
|
|
||||||
progressDialog.hide();
|
|
||||||
if(response.code() == 200) {
|
if(response.code() == 200) {
|
||||||
|
|
||||||
List<String> branchesList = new ArrayList<>();
|
List<String> branchesList = new ArrayList<>();
|
||||||
@ -588,6 +517,7 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
branchesList.add(branches.getName());
|
branchesList.add(branches.getName());
|
||||||
|
|
||||||
if(tinyDB.getString("repoBranch").equals(branches.getName())) {
|
if(tinyDB.getString("repoBranch").equals(branches.getName())) {
|
||||||
|
|
||||||
selectedBranch = i;
|
selectedBranch = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -595,27 +525,33 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
AlertDialog.Builder pBuilder = new AlertDialog.Builder(ctx);
|
AlertDialog.Builder pBuilder = new AlertDialog.Builder(ctx);
|
||||||
pBuilder.setTitle(R.string.pageTitleChooseBranch);
|
pBuilder.setTitle(R.string.pageTitleChooseBranch);
|
||||||
|
|
||||||
pBuilder.setSingleChoiceItems(branchesList.toArray(new String[0]), selectedBranch, (dialogInterface, i) -> {
|
pBuilder.setSingleChoiceItems(branchesList.toArray(new String[0]), selectedBranch, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(DialogInterface dialogInterface, int i) {
|
||||||
|
|
||||||
tinyDB.putString("repoBranch", branchesList.get(i));
|
tinyDB.putString("repoBranch", branchesList.get(i));
|
||||||
|
|
||||||
if(getFragmentRefreshListenerFiles() != null) {
|
if(getFragmentRefreshListenerFiles() != null) {
|
||||||
|
|
||||||
getFragmentRefreshListenerFiles().onRefresh(branchesList.get(i));
|
getFragmentRefreshListenerFiles().onRefresh(branchesList.get(i));
|
||||||
}
|
}
|
||||||
dialogInterface.dismiss();
|
dialogInterface.dismiss();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
pBuilder.setNeutralButton(R.string.cancelButton, null);
|
pBuilder.setNeutralButton(R.string.cancelButton, null);
|
||||||
|
|
||||||
pBuilder.create().show();
|
pBuilder.create().show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<List<Branches>> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<List<Branches>> call, @NonNull Throwable t) {
|
||||||
progressDialog.hide();
|
|
||||||
Log.e("onFailure", t.toString());
|
Log.e("onFailure", t.toString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SectionsPagerAdapter extends FragmentStatePagerAdapter {
|
public class SectionsPagerAdapter extends FragmentStatePagerAdapter {
|
||||||
@ -779,13 +715,6 @@ public class RepoDetailActivity extends BaseActivity implements BottomSheetRepoF
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Issues milestone filter interface
|
|
||||||
public FragmentRefreshListenerFilterIssuesByMilestone getFragmentRefreshListenerFilterIssuesByMilestone() { return fragmentRefreshListenerFilterIssuesByMilestone; }
|
|
||||||
|
|
||||||
public void setFragmentRefreshListenerFilterIssuesByMilestone(FragmentRefreshListenerFilterIssuesByMilestone fragmentRefreshListener) { this.fragmentRefreshListenerFilterIssuesByMilestone = fragmentRefreshListener; }
|
|
||||||
|
|
||||||
public interface FragmentRefreshListenerFilterIssuesByMilestone { void onRefresh(String text); }
|
|
||||||
|
|
||||||
// Issues interface
|
// Issues interface
|
||||||
public FragmentRefreshListener getFragmentRefreshListener() { return fragmentRefreshListener; }
|
public FragmentRefreshListener getFragmentRefreshListener() { return fragmentRefreshListener; }
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -35,69 +34,31 @@ import java.util.Locale;
|
|||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class ExploreIssuesAdapter extends RecyclerView.Adapter<ExploreIssuesAdapter.SearchViewHolder> {
|
||||||
|
|
||||||
|
private final List<Issues> searchedList;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final int TYPE_LOAD = 0;
|
|
||||||
private List<Issues> searchedList;
|
|
||||||
private OnLoadMoreListener loadMoreListener;
|
|
||||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
|
||||||
private final TinyDB tinyDb;
|
private final TinyDB tinyDb;
|
||||||
|
|
||||||
public ExploreIssuesAdapter(List<Issues> dataList, Context ctx) {
|
public ExploreIssuesAdapter(List<Issues> dataList, Context ctx) {
|
||||||
|
|
||||||
this.context = ctx;
|
this.context = ctx;
|
||||||
this.searchedList = dataList;
|
this.searchedList = dataList;
|
||||||
this.tinyDb = TinyDB.getInstance(context);
|
this.tinyDb = TinyDB.getInstance(context);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
class SearchViewHolder extends RecyclerView.ViewHolder {
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
if(viewType == TYPE_LOAD) {
|
|
||||||
return new ExploreIssuesAdapter.IssuesHolder(inflater.inflate(R.layout.list_issues, parent, false));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new ExploreIssuesAdapter.LoadHolder(inflater.inflate(R.layout.row_load, parent, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
|
||||||
isLoading = true;
|
|
||||||
loadMoreListener.onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getItemViewType(position) == TYPE_LOAD) {
|
|
||||||
((ExploreIssuesAdapter.IssuesHolder) holder).bindData(searchedList.get(position));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if(searchedList.get(position).getTitle() != null) {
|
|
||||||
return TYPE_LOAD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return searchedList.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
class IssuesHolder extends RecyclerView.ViewHolder {
|
|
||||||
private Issues issue;
|
private Issues issue;
|
||||||
private final ImageView issueAssigneeAvatar;
|
private final ImageView issueAssigneeAvatar;
|
||||||
private final TextView issueTitle;
|
private final TextView issueTitle;
|
||||||
private final TextView issueCreatedTime;
|
private final TextView issueCreatedTime;
|
||||||
private final TextView issueCommentsCount;
|
private final TextView issueCommentsCount;
|
||||||
|
|
||||||
IssuesHolder(View itemView) {
|
private SearchViewHolder(View itemView) {
|
||||||
|
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
issueAssigneeAvatar = itemView.findViewById(R.id.assigneeAvatar);
|
issueAssigneeAvatar = itemView.findViewById(R.id.assigneeAvatar);
|
||||||
issueTitle = itemView.findViewById(R.id.issueTitle);
|
issueTitle = itemView.findViewById(R.id.issueTitle);
|
||||||
issueCommentsCount = itemView.findViewById(R.id.issueCommentsCount);
|
issueCommentsCount = itemView.findViewById(R.id.issueCommentsCount);
|
||||||
@ -106,7 +67,6 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
Intent intent = new Intent(context, IssueDetailActivity.class);
|
Intent intent = new Intent(context, IssueDetailActivity.class);
|
||||||
intent.putExtra("issueNumber", issue.getNumber());
|
intent.putExtra("issueNumber", issue.getNumber());
|
||||||
intent.putExtra("openedFromLink", "true");
|
|
||||||
|
|
||||||
tinyDb.putString("issueNumber", String.valueOf(issue.getNumber()));
|
tinyDb.putString("issueNumber", String.valueOf(issue.getNumber()));
|
||||||
tinyDb.putString("issueType", "Issue");
|
tinyDb.putString("issueType", "Issue");
|
||||||
@ -148,79 +108,68 @@ public class ExploreIssuesAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@NonNull
|
||||||
void bindData(Issues issue) {
|
@Override
|
||||||
this.issue = issue;
|
public ExploreIssuesAdapter.SearchViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
||||||
|
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_issues, parent, false);
|
||||||
|
return new ExploreIssuesAdapter.SearchViewHolder(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull final ExploreIssuesAdapter.SearchViewHolder holder, int position) {
|
||||||
|
|
||||||
|
Issues currentItem = searchedList.get(position);
|
||||||
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
||||||
|
|
||||||
Locale locale = context.getResources().getConfiguration().locale;
|
Locale locale = context.getResources().getConfiguration().locale;
|
||||||
String timeFormat = tinyDb.getString("dateFormat");
|
String timeFormat = tinyDb.getString("dateFormat");
|
||||||
|
|
||||||
PicassoService.getInstance(context).get()
|
PicassoService.getInstance(context).get()
|
||||||
.load(issue.getUser().getAvatar_url())
|
.load(currentItem.getUser().getAvatar_url())
|
||||||
.placeholder(R.drawable.loader_animated)
|
.placeholder(R.drawable.loader_animated)
|
||||||
.transform(new RoundedTransformation(imgRadius, 0))
|
.transform(new RoundedTransformation(imgRadius, 0))
|
||||||
.resize(120, 120)
|
.resize(120, 120)
|
||||||
.centerCrop()
|
.centerCrop()
|
||||||
.into(issueAssigneeAvatar);
|
.into(holder.issueAssigneeAvatar);
|
||||||
|
|
||||||
String issueNumber_ = "<font color='" + ResourcesCompat.getColor(context.getResources(), R.color.lightGray, null) + "'>" + issue.getRepository().getFull_name() + context.getResources().getString(R.string.hash) + issue.getNumber() + "</font>";
|
String issueNumber_ = "<font color='" + ResourcesCompat.getColor(context.getResources(), R.color.lightGray, null) + "'>" + currentItem.getRepository().getFull_name() + context.getResources().getString(R.string.hash) + currentItem.getNumber() + "</font>";
|
||||||
|
|
||||||
issueTitle.setText(HtmlCompat.fromHtml(issueNumber_ + " " + issue.getTitle(), HtmlCompat.FROM_HTML_MODE_LEGACY));
|
holder.issue = currentItem;
|
||||||
issueCommentsCount.setText(String.valueOf(issue.getComments()));
|
holder.issueTitle.setText(HtmlCompat.fromHtml(issueNumber_ + " " + currentItem.getTitle(), HtmlCompat.FROM_HTML_MODE_LEGACY));
|
||||||
|
holder.issueCommentsCount.setText(String.valueOf(currentItem.getComments()));
|
||||||
|
|
||||||
switch(timeFormat) {
|
switch(timeFormat) {
|
||||||
case "pretty": {
|
case "pretty": {
|
||||||
PrettyTime prettyTime = new PrettyTime(locale);
|
PrettyTime prettyTime = new PrettyTime(locale);
|
||||||
String createdTime = prettyTime.format(issue.getCreated_at());
|
String createdTime = prettyTime.format(currentItem.getCreated_at());
|
||||||
issueCreatedTime.setText(createdTime);
|
holder.issueCreatedTime.setText(createdTime);
|
||||||
issueCreatedTime.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(issue.getCreated_at()), context));
|
holder.issueCreatedTime.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(currentItem.getCreated_at()), context));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "normal": {
|
case "normal": {
|
||||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
||||||
String createdTime = formatter.format(issue.getCreated_at());
|
String createdTime = formatter.format(currentItem.getCreated_at());
|
||||||
issueCreatedTime.setText(createdTime);
|
holder.issueCreatedTime.setText(createdTime);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "normal1": {
|
case "normal1": {
|
||||||
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
||||||
String createdTime = formatter.format(issue.getCreated_at());
|
String createdTime = formatter.format(currentItem.getCreated_at());
|
||||||
issueCreatedTime.setText(createdTime);
|
holder.issueCreatedTime.setText(createdTime);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static class LoadHolder extends RecyclerView.ViewHolder {
|
@Override
|
||||||
LoadHolder(View itemView) {
|
public int getItemCount() {
|
||||||
super(itemView);
|
return searchedList.size();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
|
||||||
isMoreDataAvailable = moreDataAvailable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
public void notifyDataChanged() {
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
isLoading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnLoadMoreListener {
|
|
||||||
void onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
|
||||||
this.loadMoreListener = loadMoreListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(List<Issues> list) {
|
|
||||||
searchedList = list;
|
|
||||||
notifyDataChanged();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,14 +112,9 @@ public class ExplorePublicOrganizationsAdapter extends RecyclerView.Adapter<Recy
|
|||||||
.resize(120, 120)
|
.resize(120, 120)
|
||||||
.centerCrop()
|
.centerCrop()
|
||||||
.into(image);
|
.into(image);
|
||||||
|
if (!organization.getDescription().equals("")) {
|
||||||
if(!organization.getDescription().equals("")) {
|
|
||||||
orgDescription.setVisibility(View.VISIBLE);
|
|
||||||
orgDescription.setText(organization.getDescription());
|
orgDescription.setText(organization.getDescription());
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
orgDescription.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +128,6 @@ public class ExplorePublicOrganizationsAdapter extends RecyclerView.Adapter<Recy
|
|||||||
isMoreDataAvailable = moreDataAvailable;
|
isMoreDataAvailable = moreDataAvailable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
public void notifyDataChanged() {
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
@ -149,6 +143,6 @@ public class ExplorePublicOrganizationsAdapter extends RecyclerView.Adapter<Recy
|
|||||||
|
|
||||||
public void updateList(List<Organization> list) {
|
public void updateList(List<Organization> list) {
|
||||||
organizationsList = list;
|
organizationsList = list;
|
||||||
notifyDataChanged();
|
notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Typeface;
|
import android.graphics.Typeface;
|
||||||
@ -41,61 +40,19 @@ import retrofit2.Callback;
|
|||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<ExploreRepositoriesAdapter.ReposSearchViewHolder> {
|
||||||
|
|
||||||
|
private final List<UserRepositories> reposList;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final int TYPE_LOAD = 0;
|
|
||||||
private List<UserRepositories> reposList;
|
|
||||||
private OnLoadMoreListener loadMoreListener;
|
|
||||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
|
||||||
private final TinyDB tinyDb;
|
|
||||||
|
|
||||||
public ExploreRepositoriesAdapter(List<UserRepositories> dataList, Context ctx) {
|
public ExploreRepositoriesAdapter(List<UserRepositories> dataList, Context ctx) {
|
||||||
|
|
||||||
this.context = ctx;
|
this.context = ctx;
|
||||||
this.reposList = dataList;
|
this.reposList = dataList;
|
||||||
this.tinyDb = TinyDB.getInstance(context);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
static class ReposSearchViewHolder extends RecyclerView.ViewHolder {
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
if(viewType == TYPE_LOAD) {
|
|
||||||
return new ExploreRepositoriesAdapter.RepositoriesHolder(inflater.inflate(R.layout.list_repositories, parent, false));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new ExploreRepositoriesAdapter.LoadHolder(inflater.inflate(R.layout.row_load, parent, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
|
||||||
isLoading = true;
|
|
||||||
loadMoreListener.onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getItemViewType(position) == TYPE_LOAD) {
|
|
||||||
((ExploreRepositoriesAdapter.RepositoriesHolder) holder).bindData(reposList.get(position));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if(reposList.get(position).getFullName() != null) {
|
|
||||||
return TYPE_LOAD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return reposList.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
class RepositoriesHolder extends RecyclerView.ViewHolder {
|
|
||||||
private UserRepositories userRepositories;
|
private UserRepositories userRepositories;
|
||||||
|
|
||||||
private final ImageView image;
|
private final ImageView image;
|
||||||
@ -105,9 +62,9 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<RecyclerVie
|
|||||||
private CheckBox isRepoAdmin;
|
private CheckBox isRepoAdmin;
|
||||||
private final TextView repoStars;
|
private final TextView repoStars;
|
||||||
private final TextView repoLastUpdated;
|
private final TextView repoLastUpdated;
|
||||||
private final View spacerView;
|
|
||||||
|
|
||||||
RepositoriesHolder(View itemView) {
|
private ReposSearchViewHolder(View itemView) {
|
||||||
|
|
||||||
super(itemView);
|
super(itemView);
|
||||||
repoName = itemView.findViewById(R.id.repoName);
|
repoName = itemView.findViewById(R.id.repoName);
|
||||||
orgName = itemView.findViewById(R.id.orgName);
|
orgName = itemView.findViewById(R.id.orgName);
|
||||||
@ -116,11 +73,12 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<RecyclerVie
|
|||||||
image = itemView.findViewById(R.id.imageAvatar);
|
image = itemView.findViewById(R.id.imageAvatar);
|
||||||
repoStars = itemView.findViewById(R.id.repoStars);
|
repoStars = itemView.findViewById(R.id.repoStars);
|
||||||
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
||||||
spacerView = itemView.findViewById(R.id.spacerView);
|
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
|
|
||||||
Context context = v.getContext();
|
Context context = v.getContext();
|
||||||
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
|
||||||
Intent intent = new Intent(context, RepoDetailActivity.class);
|
Intent intent = new Intent(context, RepoDetailActivity.class);
|
||||||
intent.putExtra("repoFullName", userRepositories.getFullName());
|
intent.putExtra("repoFullName", userRepositories.getFullName());
|
||||||
|
|
||||||
@ -195,107 +153,98 @@ public class ExploreRepositoriesAdapter extends RecyclerView.Adapter<RecyclerVie
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
}
|
||||||
void bindData(UserRepositories userRepositories) {
|
|
||||||
this.userRepositories = userRepositories;
|
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public ExploreRepositoriesAdapter.ReposSearchViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
||||||
|
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_repositories, parent, false);
|
||||||
|
return new ExploreRepositoriesAdapter.ReposSearchViewHolder(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull final ExploreRepositoriesAdapter.ReposSearchViewHolder holder, int position) {
|
||||||
|
|
||||||
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
UserRepositories currentItem = reposList.get(position);
|
||||||
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
||||||
|
|
||||||
Locale locale = context.getResources().getConfiguration().locale;
|
Locale locale = context.getResources().getConfiguration().locale;
|
||||||
String timeFormat = tinyDb.getString("dateFormat");
|
String timeFormat = tinyDb.getString("dateFormat");
|
||||||
|
holder.userRepositories = currentItem;
|
||||||
orgName.setText(userRepositories.getFullName().split("/")[0]);
|
holder.orgName.setText(currentItem.getFullName().split("/")[0]);
|
||||||
repoName.setText(userRepositories.getFullName().split("/")[1]);
|
holder.repoName.setText(currentItem.getFullName().split("/")[1]);
|
||||||
repoStars.setText(userRepositories.getStars_count());
|
holder.repoStars.setText(currentItem.getStars_count());
|
||||||
|
|
||||||
ColorGenerator generator = ColorGenerator.MATERIAL;
|
ColorGenerator generator = ColorGenerator.MATERIAL;
|
||||||
int color = generator.getColor(userRepositories.getName());
|
int color = generator.getColor(currentItem.getName());
|
||||||
String firstCharacter = String.valueOf(userRepositories.getFullName().charAt(0));
|
String firstCharacter = String.valueOf(currentItem.getFullName().charAt(0));
|
||||||
|
|
||||||
TextDrawable drawable = TextDrawable.builder().beginConfig().useFont(Typeface.DEFAULT).fontSize(18).toUpperCase().width(28).height(28).endConfig().buildRoundRect(firstCharacter, color, 3);
|
TextDrawable drawable = TextDrawable.builder().beginConfig().useFont(Typeface.DEFAULT).fontSize(18).toUpperCase().width(28).height(28).endConfig().buildRoundRect(firstCharacter, color, 3);
|
||||||
|
|
||||||
if(userRepositories.getAvatar_url() != null) {
|
if(currentItem.getAvatar_url() != null) {
|
||||||
if(!userRepositories.getAvatar_url().equals("")) {
|
if(!currentItem.getAvatar_url().equals("")) {
|
||||||
PicassoService.getInstance(context).get().load(userRepositories.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(image);
|
PicassoService.getInstance(context).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(holder.image);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
image.setImageDrawable(drawable);
|
holder.image.setImageDrawable(drawable);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
image.setImageDrawable(drawable);
|
holder.image.setImageDrawable(drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(userRepositories.getUpdated_at() != null) {
|
if(currentItem.getUpdated_at() != null) {
|
||||||
|
|
||||||
switch(timeFormat) {
|
switch(timeFormat) {
|
||||||
case "pretty": {
|
case "pretty": {
|
||||||
PrettyTime prettyTime = new PrettyTime(locale);
|
PrettyTime prettyTime = new PrettyTime(locale);
|
||||||
String createdTime = prettyTime.format(userRepositories.getUpdated_at());
|
String createdTime = prettyTime.format(currentItem.getUpdated_at());
|
||||||
repoLastUpdated.setText(context.getString(R.string.lastUpdatedAt, createdTime));
|
holder.repoLastUpdated.setText(context.getString(R.string.lastUpdatedAt, createdTime));
|
||||||
repoLastUpdated.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(userRepositories.getUpdated_at()), context));
|
holder.repoLastUpdated.setOnClickListener(new ClickListener(TimeHelper.customDateFormatForToastDateFormat(currentItem.getUpdated_at()), context));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "normal": {
|
case "normal": {
|
||||||
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
||||||
String createdTime = formatter.format(userRepositories.getUpdated_at());
|
String createdTime = formatter.format(currentItem.getUpdated_at());
|
||||||
repoLastUpdated.setText(context.getString(R.string.lastUpdatedAt, createdTime));
|
holder.repoLastUpdated.setText(context.getString(R.string.lastUpdatedAt, createdTime));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case "normal1": {
|
case "normal1": {
|
||||||
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
DateFormat formatter = new SimpleDateFormat("dd-MM-yyyy '" + context.getResources().getString(R.string.timeAtText) + "' HH:mm", locale);
|
||||||
String createdTime = formatter.format(userRepositories.getUpdated_at());
|
String createdTime = formatter.format(currentItem.getUpdated_at());
|
||||||
repoLastUpdated.setText(context.getString(R.string.lastUpdatedAt, createdTime));
|
holder.repoLastUpdated.setText(context.getString(R.string.lastUpdatedAt, createdTime));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
repoLastUpdated.setVisibility(View.GONE);
|
holder.repoLastUpdated.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!userRepositories.getDescription().equals("")) {
|
if(!currentItem.getDescription().equals("")) {
|
||||||
repoDescription.setVisibility(View.VISIBLE);
|
holder.repoDescription.setText(currentItem.getDescription());
|
||||||
repoDescription.setText(userRepositories.getDescription());
|
|
||||||
spacerView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
repoDescription.setVisibility(View.GONE);
|
holder.repoDescription.setText(context.getString(R.string.noDataDescription));
|
||||||
spacerView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isRepoAdmin == null) {
|
if(holder.isRepoAdmin == null) {
|
||||||
isRepoAdmin = new CheckBox(context);
|
holder.isRepoAdmin = new CheckBox(context);
|
||||||
}
|
|
||||||
isRepoAdmin.setChecked(userRepositories.getPermissions().isAdmin());
|
|
||||||
}
|
}
|
||||||
|
holder.isRepoAdmin.setChecked(currentItem.getPermissions().isAdmin());
|
||||||
}
|
}
|
||||||
|
|
||||||
static class LoadHolder extends RecyclerView.ViewHolder {
|
@Override
|
||||||
LoadHolder(View itemView) {
|
public int getItemCount() {
|
||||||
super(itemView);
|
|
||||||
}
|
return reposList.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
|
||||||
isMoreDataAvailable = moreDataAvailable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
public void notifyDataChanged() {
|
||||||
|
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
isLoading = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OnLoadMoreListener {
|
|
||||||
void onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
|
||||||
this.loadMoreListener = loadMoreListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(List<UserRepositories> list) {
|
|
||||||
reposList = list;
|
|
||||||
notifyDataChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,154 +0,0 @@
|
|||||||
package org.mian.gitnex.adapters;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.text.Html;
|
|
||||||
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;
|
|
||||||
import org.gitnex.tea4j.models.UserInfo;
|
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.activities.ProfileActivity;
|
|
||||||
import org.mian.gitnex.clients.PicassoService;
|
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
|
||||||
import org.mian.gitnex.helpers.RoundedTransformation;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Author M M Arif
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ExploreUsersAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
|
||||||
|
|
||||||
private final Context context;
|
|
||||||
private final int TYPE_LOAD = 0;
|
|
||||||
private List<UserInfo> usersList;
|
|
||||||
private OnLoadMoreListener loadMoreListener;
|
|
||||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
|
||||||
|
|
||||||
public ExploreUsersAdapter(Context ctx, List<UserInfo> usersListMain) {
|
|
||||||
this.context = ctx;
|
|
||||||
this.usersList = usersListMain;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
if(viewType == TYPE_LOAD) {
|
|
||||||
return new ExploreUsersAdapter.UsersHolder(inflater.inflate(R.layout.list_explore_users, parent, false));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new ExploreUsersAdapter.LoadHolder(inflater.inflate(R.layout.row_load, parent, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
|
||||||
isLoading = true;
|
|
||||||
loadMoreListener.onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getItemViewType(position) == TYPE_LOAD) {
|
|
||||||
((ExploreUsersAdapter.UsersHolder) holder).bindData(usersList.get(position));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if(usersList.get(position).getUsername() != null) {
|
|
||||||
return TYPE_LOAD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return usersList.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
class UsersHolder extends RecyclerView.ViewHolder {
|
|
||||||
private UserInfo userInfo;
|
|
||||||
private final ImageView userAvatar;
|
|
||||||
private final TextView userFullName;
|
|
||||||
private final TextView userName;
|
|
||||||
|
|
||||||
UsersHolder(View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
userAvatar = itemView.findViewById(R.id.userAvatar);
|
|
||||||
userFullName = itemView.findViewById(R.id.userFullName);
|
|
||||||
userName = itemView.findViewById(R.id.userName);
|
|
||||||
|
|
||||||
itemView.setOnClickListener(loginId -> {
|
|
||||||
Intent intent = new Intent(context, ProfileActivity.class);
|
|
||||||
intent.putExtra("username", userInfo.getLogin());
|
|
||||||
context.startActivity(intent);
|
|
||||||
});
|
|
||||||
|
|
||||||
itemView.setOnLongClickListener(loginId -> {
|
|
||||||
AppUtil.copyToClipboard(context, userInfo.getLogin(), context.getString(R.string.copyLoginIdToClipBoard, userInfo.getLogin()));
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
|
||||||
void bindData(UserInfo userInfo) {
|
|
||||||
this.userInfo = userInfo;
|
|
||||||
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
|
||||||
userName.setText(userInfo.getUsername());
|
|
||||||
PicassoService.getInstance(context).get()
|
|
||||||
.load(userInfo.getAvatar())
|
|
||||||
.placeholder(R.drawable.loader_animated)
|
|
||||||
.transform(new RoundedTransformation(imgRadius, 0))
|
|
||||||
.resize(120, 120)
|
|
||||||
.centerCrop()
|
|
||||||
.into(userAvatar);
|
|
||||||
|
|
||||||
if(!userInfo.getFullname().equals("")) {
|
|
||||||
userFullName.setText(Html.fromHtml(userInfo.getFullname()));
|
|
||||||
userName.setText(context.getResources().getString(R.string.usernameWithAt, userInfo.getUsername()));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
userFullName.setText(userInfo.getUsername());
|
|
||||||
userName.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class LoadHolder extends RecyclerView.ViewHolder {
|
|
||||||
LoadHolder(View itemView) {
|
|
||||||
super(itemView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
|
||||||
isMoreDataAvailable = moreDataAvailable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
|
||||||
notifyDataSetChanged();
|
|
||||||
isLoading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnLoadMoreListener {
|
|
||||||
void onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
|
||||||
this.loadMoreListener = loadMoreListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(List<UserInfo> list) {
|
|
||||||
usersList = list;
|
|
||||||
notifyDataChanged();
|
|
||||||
}
|
|
||||||
}
|
|
@ -6,8 +6,6 @@ import android.content.ClipboardManager;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -115,11 +113,6 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
|||||||
dialog.show();
|
dialog.show();
|
||||||
|
|
||||||
LinearLayout linearLayout = vw.findViewById(R.id.commentReactionButtons);
|
LinearLayout linearLayout = vw.findViewById(R.id.commentReactionButtons);
|
||||||
TextView loadReactions = new TextView(context);
|
|
||||||
loadReactions.setText(context.getString(R.string.genericWaitFor));
|
|
||||||
loadReactions.setGravity(Gravity.CENTER);
|
|
||||||
loadReactions.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 160));
|
|
||||||
linearLayout.addView(loadReactions);
|
|
||||||
|
|
||||||
Bundle bundle1 = new Bundle();
|
Bundle bundle1 = new Bundle();
|
||||||
bundle1.putAll(bundle);
|
bundle1.putAll(bundle);
|
||||||
@ -133,12 +126,7 @@ public class IssueCommentsAdapter extends RecyclerView.Adapter<IssueCommentsAdap
|
|||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
});
|
});
|
||||||
|
|
||||||
Handler handler = new Handler();
|
|
||||||
handler.postDelayed(() -> {
|
|
||||||
linearLayout.removeView(loadReactions);
|
|
||||||
reactionSpinner.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 160));
|
|
||||||
linearLayout.addView(reactionSpinner);
|
linearLayout.addView(reactionSpinner);
|
||||||
}, 2500);
|
|
||||||
|
|
||||||
commentMenuEdit.setOnClickListener(v1 -> {
|
commentMenuEdit.setOnClickListener(v1 -> {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
@ -23,65 +22,21 @@ import java.util.List;
|
|||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MyProfileFollowersAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class MyProfileFollowersAdapter extends RecyclerView.Adapter<MyProfileFollowersAdapter.FollowersViewHolder> {
|
||||||
|
|
||||||
|
private final List<UserInfo> followersList;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final int TYPE_LOAD = 0;
|
|
||||||
private List<UserInfo> followersList;
|
|
||||||
private OnLoadMoreListener loadMoreListener;
|
|
||||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
|
||||||
|
|
||||||
public MyProfileFollowersAdapter(List<UserInfo> dataList, Context ctx) {
|
class FollowersViewHolder extends RecyclerView.ViewHolder {
|
||||||
this.context = ctx;
|
|
||||||
this.followersList = dataList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
private String userLoginId;
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
if(viewType == TYPE_LOAD) {
|
|
||||||
return new MyProfileFollowersAdapter.FollowersHolder(inflater.inflate(R.layout.list_profile_followers_following, parent, false));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new MyProfileFollowersAdapter.LoadHolder(inflater.inflate(R.layout.row_load, parent, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
|
||||||
isLoading = true;
|
|
||||||
loadMoreListener.onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getItemViewType(position) == TYPE_LOAD) {
|
|
||||||
((MyProfileFollowersAdapter.FollowersHolder) holder).bindData(followersList.get(position));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if(followersList.get(position).getUsername() != null) {
|
|
||||||
return TYPE_LOAD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return followersList.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
class FollowersHolder extends RecyclerView.ViewHolder {
|
|
||||||
private UserInfo userInfo;
|
|
||||||
private final ImageView userAvatar;
|
private final ImageView userAvatar;
|
||||||
private final TextView userFullName;
|
private final TextView userFullName;
|
||||||
private final TextView userName;
|
private final TextView userName;
|
||||||
|
|
||||||
FollowersHolder(View itemView) {
|
private FollowersViewHolder(View itemView) {
|
||||||
|
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
userAvatar = itemView.findViewById(R.id.userAvatar);
|
userAvatar = itemView.findViewById(R.id.userAvatar);
|
||||||
@ -90,62 +45,56 @@ public class MyProfileFollowersAdapter extends RecyclerView.Adapter<RecyclerView
|
|||||||
|
|
||||||
itemView.setOnClickListener(loginId -> {
|
itemView.setOnClickListener(loginId -> {
|
||||||
Intent intent = new Intent(context, ProfileActivity.class);
|
Intent intent = new Intent(context, ProfileActivity.class);
|
||||||
intent.putExtra("username", userInfo.getLogin());
|
intent.putExtra("username", userLoginId);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
|
|
||||||
itemView.setOnLongClickListener(loginId -> {
|
itemView.setOnLongClickListener(loginId -> {
|
||||||
AppUtil.copyToClipboard(context, userInfo.getLogin(), context.getString(R.string.copyLoginIdToClipBoard, userInfo.getLogin()));
|
AppUtil.copyToClipboard(context, userLoginId, context.getString(R.string.copyLoginIdToClipBoard, userLoginId));
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
public MyProfileFollowersAdapter(Context ctx, List<UserInfo> followersListMain) {
|
||||||
void bindData(UserInfo userInfo) {
|
|
||||||
this.userInfo = userInfo;
|
this.context = ctx;
|
||||||
|
this.followersList = followersListMain;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public MyProfileFollowersAdapter.FollowersViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
||||||
|
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_profile_followers_following, parent, false);
|
||||||
|
return new FollowersViewHolder(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull MyProfileFollowersAdapter.FollowersViewHolder holder, int position) {
|
||||||
|
|
||||||
|
UserInfo currentItem = followersList.get(position);
|
||||||
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
||||||
|
|
||||||
if(!userInfo.getFullname().equals("")) {
|
holder.userLoginId = currentItem.getLogin();
|
||||||
userFullName.setText(Html.fromHtml(userInfo.getFullname()));
|
|
||||||
userName.setText(context.getResources().getString(R.string.usernameWithAt, userInfo.getUsername()));
|
if(!currentItem.getFullname().equals("")) {
|
||||||
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
|
holder.userName.setText(context.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
userFullName.setText(userInfo.getUsername());
|
holder.userFullName.setText(currentItem.getUsername());
|
||||||
userName.setVisibility(View.GONE);
|
holder.userName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
PicassoService.getInstance(context).get().load(userInfo.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(userAvatar);
|
PicassoService.getInstance(context).get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static class LoadHolder extends RecyclerView.ViewHolder {
|
@Override
|
||||||
LoadHolder(View itemView) {
|
public int getItemCount() {
|
||||||
super(itemView);
|
return followersList.size();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
|
||||||
isMoreDataAvailable = moreDataAvailable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
|
||||||
notifyDataSetChanged();
|
|
||||||
isLoading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnLoadMoreListener {
|
|
||||||
void onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
|
||||||
this.loadMoreListener = loadMoreListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(List<UserInfo> list) {
|
|
||||||
followersList = list;
|
|
||||||
notifyDataChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.text.Html;
|
import android.text.Html;
|
||||||
@ -23,65 +22,21 @@ import java.util.List;
|
|||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class MyProfileFollowingAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class MyProfileFollowingAdapter extends RecyclerView.Adapter<MyProfileFollowingAdapter.FollowingViewHolder> {
|
||||||
|
|
||||||
|
private final List<UserInfo> followingList;
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final int TYPE_LOAD = 0;
|
|
||||||
private List<UserInfo> followingList;
|
|
||||||
private OnLoadMoreListener loadMoreListener;
|
|
||||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
|
||||||
|
|
||||||
public MyProfileFollowingAdapter(List<UserInfo> dataList, Context ctx) {
|
class FollowingViewHolder extends RecyclerView.ViewHolder {
|
||||||
this.context = ctx;
|
|
||||||
this.followingList = dataList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
private String userLoginId;
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
if(viewType == TYPE_LOAD) {
|
|
||||||
return new MyProfileFollowingAdapter.FollowingHolder(inflater.inflate(R.layout.list_profile_followers_following, parent, false));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new MyProfileFollowingAdapter.LoadHolder(inflater.inflate(R.layout.row_load, parent, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
|
||||||
isLoading = true;
|
|
||||||
loadMoreListener.onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getItemViewType(position) == TYPE_LOAD) {
|
|
||||||
((MyProfileFollowingAdapter.FollowingHolder) holder).bindData(followingList.get(position));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if(followingList.get(position).getUsername() != null) {
|
|
||||||
return TYPE_LOAD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return followingList.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
class FollowingHolder extends RecyclerView.ViewHolder {
|
|
||||||
private UserInfo userInfo;
|
|
||||||
private final ImageView userAvatar;
|
private final ImageView userAvatar;
|
||||||
private final TextView userFullName;
|
private final TextView userFullName;
|
||||||
private final TextView userName;
|
private final TextView userName;
|
||||||
|
|
||||||
FollowingHolder(View itemView) {
|
private FollowingViewHolder(View itemView) {
|
||||||
|
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
userAvatar = itemView.findViewById(R.id.userAvatar);
|
userAvatar = itemView.findViewById(R.id.userAvatar);
|
||||||
@ -90,60 +45,55 @@ public class MyProfileFollowingAdapter extends RecyclerView.Adapter<RecyclerView
|
|||||||
|
|
||||||
itemView.setOnClickListener(loginId -> {
|
itemView.setOnClickListener(loginId -> {
|
||||||
Intent intent = new Intent(context, ProfileActivity.class);
|
Intent intent = new Intent(context, ProfileActivity.class);
|
||||||
intent.putExtra("username", userInfo.getLogin());
|
intent.putExtra("username", userLoginId);
|
||||||
context.startActivity(intent);
|
context.startActivity(intent);
|
||||||
});
|
});
|
||||||
|
|
||||||
itemView.setOnLongClickListener(loginId -> {
|
itemView.setOnLongClickListener(loginId -> {
|
||||||
AppUtil.copyToClipboard(context, userInfo.getLogin(), context.getString(R.string.copyLoginIdToClipBoard, userInfo.getLogin()));
|
AppUtil.copyToClipboard(context, userLoginId, context.getString(R.string.copyLoginIdToClipBoard, userLoginId));
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
public MyProfileFollowingAdapter(Context ctx, List<UserInfo> followingListMain) {
|
||||||
void bindData(UserInfo userInfo) {
|
|
||||||
this.userInfo = userInfo;
|
this.context = ctx;
|
||||||
|
this.followingList = followingListMain;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
@Override
|
||||||
|
public MyProfileFollowingAdapter.FollowingViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
||||||
|
View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_profile_followers_following, parent, false);
|
||||||
|
return new FollowingViewHolder(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull MyProfileFollowingAdapter.FollowingViewHolder holder, int position) {
|
||||||
|
|
||||||
|
UserInfo currentItem = followingList.get(position);
|
||||||
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
int imgRadius = AppUtil.getPixelsFromDensity(context, 3);
|
||||||
|
|
||||||
if(!userInfo.getFullname().equals("")) {
|
holder.userLoginId = currentItem.getLogin();
|
||||||
userFullName.setText(Html.fromHtml(userInfo.getFullname()));
|
|
||||||
userName.setText(context.getResources().getString(R.string.usernameWithAt, userInfo.getUsername()));
|
if(!currentItem.getFullname().equals("")) {
|
||||||
|
holder.userFullName.setText(Html.fromHtml(currentItem.getFullname()));
|
||||||
|
holder.userName.setText(context.getResources().getString(R.string.usernameWithAt, currentItem.getUsername()));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
userFullName.setText(userInfo.getUsername());
|
holder.userFullName.setText(currentItem.getUsername());
|
||||||
userName.setVisibility(View.GONE);
|
holder.userName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
PicassoService.getInstance(context).get().load(userInfo.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(userAvatar);
|
PicassoService.getInstance(context).get().load(currentItem.getAvatar()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(holder.userAvatar);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static class LoadHolder extends RecyclerView.ViewHolder {
|
@Override
|
||||||
LoadHolder(View itemView) {
|
public int getItemCount() {
|
||||||
super(itemView);
|
return followingList.size();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
|
||||||
isMoreDataAvailable = moreDataAvailable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
|
||||||
notifyDataSetChanged();
|
|
||||||
isLoading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnLoadMoreListener {
|
|
||||||
void onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
|
||||||
this.loadMoreListener = loadMoreListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(List<UserInfo> list) {
|
|
||||||
followingList = list;
|
|
||||||
notifyDataChanged();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,6 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
|||||||
private CheckBox isRepoAdmin;
|
private CheckBox isRepoAdmin;
|
||||||
private final TextView repoStars;
|
private final TextView repoStars;
|
||||||
private final TextView repoLastUpdated;
|
private final TextView repoLastUpdated;
|
||||||
private final View spacerView;
|
|
||||||
|
|
||||||
private MyReposViewHolder(View itemView) {
|
private MyReposViewHolder(View itemView) {
|
||||||
|
|
||||||
@ -72,7 +71,6 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
|||||||
image = itemView.findViewById(R.id.imageAvatar);
|
image = itemView.findViewById(R.id.imageAvatar);
|
||||||
repoStars = itemView.findViewById(R.id.repoStars);
|
repoStars = itemView.findViewById(R.id.repoStars);
|
||||||
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
||||||
spacerView = itemView.findViewById(R.id.spacerView);
|
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
|
|
||||||
@ -246,13 +244,10 @@ public class MyReposListAdapter extends RecyclerView.Adapter<MyReposListAdapter.
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!currentItem.getDescription().equals("")) {
|
if(!currentItem.getDescription().equals("")) {
|
||||||
holder.repoDescription.setVisibility(View.VISIBLE);
|
|
||||||
holder.repoDescription.setText(currentItem.getDescription());
|
holder.repoDescription.setText(currentItem.getDescription());
|
||||||
holder.spacerView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.repoDescription.setVisibility(View.GONE);
|
holder.repoDescription.setText(context.getString(R.string.noDataDescription));
|
||||||
holder.spacerView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(holder.isRepoAdmin == null) {
|
if(holder.isRepoAdmin == null) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package org.mian.gitnex.adapters;
|
package org.mian.gitnex.adapters;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -22,21 +21,18 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Author opyale
|
* Author opyale
|
||||||
* Modified M M Arif
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class NotificationsAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
public class NotificationsAdapter extends RecyclerView.Adapter<NotificationsAdapter.NotificationsViewHolder> {
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final int TYPE_LOAD = 0;
|
private final List<NotificationThread> notificationThreads;
|
||||||
private List<NotificationThread> notificationThreads;
|
|
||||||
private final OnMoreClickedListener onMoreClickedListener;
|
private final OnMoreClickedListener onMoreClickedListener;
|
||||||
private final OnNotificationClickedListener onNotificationClickedListener;
|
private final OnNotificationClickedListener onNotificationClickedListener;
|
||||||
private OnLoadMoreListener loadMoreListener;
|
|
||||||
private boolean isLoading = false, isMoreDataAvailable = true;
|
|
||||||
private final TinyDB tinyDb;
|
private final TinyDB tinyDb;
|
||||||
|
|
||||||
public NotificationsAdapter(Context context, List<NotificationThread> notificationThreads, OnMoreClickedListener onMoreClickedListener, OnNotificationClickedListener onNotificationClickedListener) {
|
public NotificationsAdapter(Context context, List<NotificationThread> notificationThreads, OnMoreClickedListener onMoreClickedListener, OnNotificationClickedListener onNotificationClickedListener) {
|
||||||
|
|
||||||
this.tinyDb = TinyDB.getInstance(context);
|
this.tinyDb = TinyDB.getInstance(context);
|
||||||
this.context = context;
|
this.context = context;
|
||||||
this.notificationThreads = notificationThreads;
|
this.notificationThreads = notificationThreads;
|
||||||
@ -44,46 +40,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
this.onNotificationClickedListener = onNotificationClickedListener;
|
this.onNotificationClickedListener = onNotificationClickedListener;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
static class NotificationsViewHolder extends RecyclerView.ViewHolder {
|
||||||
@Override
|
|
||||||
public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
|
||||||
LayoutInflater inflater = LayoutInflater.from(context);
|
|
||||||
if(viewType == TYPE_LOAD) {
|
|
||||||
return new NotificationsAdapter.NotificationsHolder(inflater.inflate(R.layout.list_notifications, parent, false));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new NotificationsAdapter.LoadHolder(inflater.inflate(R.layout.row_load, parent, false));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
|
|
||||||
if(position >= getItemCount() - 1 && isMoreDataAvailable && !isLoading && loadMoreListener != null) {
|
|
||||||
isLoading = true;
|
|
||||||
loadMoreListener.onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(getItemViewType(position) == TYPE_LOAD) {
|
|
||||||
((NotificationsAdapter.NotificationsHolder) holder).bindData(notificationThreads.get(position));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemViewType(int position) {
|
|
||||||
if(notificationThreads.get(position).getSubject() != null) {
|
|
||||||
return TYPE_LOAD;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getItemCount() {
|
|
||||||
return notificationThreads.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
class NotificationsHolder extends RecyclerView.ViewHolder {
|
|
||||||
|
|
||||||
private final LinearLayout frame;
|
private final LinearLayout frame;
|
||||||
private final TextView subject;
|
private final TextView subject;
|
||||||
@ -94,9 +51,10 @@ public class NotificationsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
private final ImageView pinned;
|
private final ImageView pinned;
|
||||||
private final ImageView more;
|
private final ImageView more;
|
||||||
|
|
||||||
NotificationsHolder(View itemView) {
|
public NotificationsViewHolder(@NonNull View itemView) {
|
||||||
|
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
frame = itemView.findViewById(R.id.frame);
|
frame = itemView.findViewById(R.id.frame);
|
||||||
subject = itemView.findViewById(R.id.subject);
|
subject = itemView.findViewById(R.id.subject);
|
||||||
repository = itemView.findViewById(R.id.repository);
|
repository = itemView.findViewById(R.id.repository);
|
||||||
@ -106,42 +64,57 @@ public class NotificationsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
pinned = itemView.findViewById(R.id.pinned);
|
pinned = itemView.findViewById(R.id.pinned);
|
||||||
more = itemView.findViewById(R.id.more);
|
more = itemView.findViewById(R.id.more);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@NonNull
|
||||||
void bindData(NotificationThread notificationThread) {
|
@Override
|
||||||
|
public NotificationsViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
|
|
||||||
|
View v = LayoutInflater.from(context).inflate(R.layout.list_notifications, parent, false);
|
||||||
|
return new NotificationsAdapter.NotificationsViewHolder(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBindViewHolder(@NonNull NotificationsViewHolder holder, int position) {
|
||||||
|
|
||||||
|
NotificationThread notificationThread = notificationThreads.get(position);
|
||||||
|
|
||||||
String url = notificationThread.getSubject().getUrl();
|
String url = notificationThread.getSubject().getUrl();
|
||||||
String subjectId = "<font color='" + ResourcesCompat.getColor(context.getResources(), R.color.lightGray, null) + "'>" + context.getResources().getString(R.string.hash) + url.substring(url.lastIndexOf("/") + 1) + "</font>";
|
String subjectId = "<font color='" + ResourcesCompat.getColor(context.getResources(), R.color.lightGray, null) + "'>" + context.getResources()
|
||||||
|
.getString(R.string.hash) + url.substring(url.lastIndexOf("/") + 1) + "</font>";
|
||||||
|
|
||||||
subject.setText(HtmlCompat.fromHtml(subjectId + " " + notificationThread.getSubject().getTitle(), HtmlCompat.FROM_HTML_MODE_LEGACY));
|
holder.subject.setText(HtmlCompat.fromHtml(subjectId + " " + notificationThread.getSubject().getTitle(), HtmlCompat.FROM_HTML_MODE_LEGACY));
|
||||||
repository.setText(notificationThread.getRepository().getFullName());
|
holder.repository.setText(notificationThread.getRepository().getFullName());
|
||||||
|
|
||||||
if(notificationThread.isPinned()) {
|
if(notificationThread.isPinned()) {
|
||||||
pinned.setVisibility(View.VISIBLE);
|
holder.pinned.setVisibility(View.VISIBLE);
|
||||||
}
|
} else {
|
||||||
else {
|
holder.pinned.setVisibility(View.GONE);
|
||||||
pinned.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(notificationThread.getSubject().getType()) {
|
switch(notificationThread.getSubject().getType()) {
|
||||||
|
|
||||||
case "Pull":
|
case "Pull":
|
||||||
typePr.setVisibility(View.VISIBLE);
|
holder.typePr.setVisibility(View.VISIBLE);
|
||||||
typeIssue.setVisibility(View.GONE);
|
holder.typeIssue.setVisibility(View.GONE);
|
||||||
typeUnknown.setVisibility(View.GONE);
|
holder.typeUnknown.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "Issue":
|
case "Issue":
|
||||||
typePr.setVisibility(View.GONE);
|
holder.typePr.setVisibility(View.GONE);
|
||||||
typeIssue.setVisibility(View.VISIBLE);
|
holder.typeIssue.setVisibility(View.VISIBLE);
|
||||||
typeUnknown.setVisibility(View.GONE);
|
holder.typeUnknown.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
typePr.setVisibility(View.GONE);
|
holder.typePr.setVisibility(View.GONE);
|
||||||
typeIssue.setVisibility(View.GONE);
|
holder.typeIssue.setVisibility(View.GONE);
|
||||||
typeUnknown.setVisibility(View.VISIBLE);
|
holder.typeUnknown.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
frame.setOnClickListener(v -> {
|
holder.frame.setOnClickListener(v -> {
|
||||||
|
|
||||||
onNotificationClickedListener.onNotificationClicked(notificationThread);
|
onNotificationClickedListener.onNotificationClicked(notificationThread);
|
||||||
|
|
||||||
@ -157,51 +130,29 @@ public class NotificationsAdapter extends RecyclerView.Adapter<RecyclerView.View
|
|||||||
if(count == 0) {
|
if(count == 0) {
|
||||||
long id = repositoryData.insertRepository(currentActiveAccountId, repoOwner, repoName);
|
long id = repositoryData.insertRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
tinyDb.putLong("repositoryId", id);
|
tinyDb.putLong("repositoryId", id);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
Repository data = repositoryData.getRepository(currentActiveAccountId, repoOwner, repoName);
|
Repository data = repositoryData.getRepository(currentActiveAccountId, repoOwner, repoName);
|
||||||
tinyDb.putLong("repositoryId", data.getRepositoryId());
|
tinyDb.putLong("repositoryId", data.getRepositoryId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
more.setOnClickListener(v -> onMoreClickedListener.onMoreClicked(notificationThread));
|
holder.more.setOnClickListener(v -> onMoreClickedListener.onMoreClicked(notificationThread));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static class LoadHolder extends RecyclerView.ViewHolder {
|
@Override
|
||||||
LoadHolder(View itemView) {
|
public int getItemCount() {
|
||||||
super(itemView);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setMoreDataAvailable(boolean moreDataAvailable) {
|
return notificationThreads.size();
|
||||||
isMoreDataAvailable = moreDataAvailable;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
|
||||||
public void notifyDataChanged() {
|
|
||||||
notifyDataSetChanged();
|
|
||||||
isLoading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface OnLoadMoreListener {
|
|
||||||
void onLoadMore();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLoadMoreListener(OnLoadMoreListener loadMoreListener) {
|
|
||||||
this.loadMoreListener = loadMoreListener;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void updateList(List<NotificationThread> list) {
|
|
||||||
notificationThreads = list;
|
|
||||||
notifyDataChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OnNotificationClickedListener {
|
public interface OnNotificationClickedListener {
|
||||||
|
|
||||||
void onNotificationClicked(NotificationThread notificationThread);
|
void onNotificationClicked(NotificationThread notificationThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OnMoreClickedListener {
|
public interface OnMoreClickedListener {
|
||||||
|
|
||||||
void onMoreClicked(NotificationThread notificationThread);
|
void onMoreClicked(NotificationThread notificationThread);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -88,13 +88,10 @@ public class OrganizationsListAdapter extends RecyclerView.Adapter<Organizations
|
|||||||
|
|
||||||
PicassoService.getInstance(context).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(holder.image);
|
PicassoService.getInstance(context).get().load(currentItem.getAvatar_url()).placeholder(R.drawable.loader_animated).transform(new RoundedTransformation(imgRadius, 0)).resize(120, 120).centerCrop().into(holder.image);
|
||||||
|
|
||||||
if(!currentItem.getDescription().equals("")) {
|
if (!currentItem.getDescription().equals("")) {
|
||||||
holder.orgDescription.setVisibility(View.VISIBLE);
|
|
||||||
holder.orgDescription.setText(currentItem.getDescription());
|
holder.orgDescription.setText(currentItem.getDescription());
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
holder.orgDescription.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -60,7 +60,6 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
|||||||
private CheckBox isRepoAdmin;
|
private CheckBox isRepoAdmin;
|
||||||
private final TextView repoStars;
|
private final TextView repoStars;
|
||||||
private final TextView repoLastUpdated;
|
private final TextView repoLastUpdated;
|
||||||
private final View spacerView;
|
|
||||||
|
|
||||||
private ReposViewHolder(View itemView) {
|
private ReposViewHolder(View itemView) {
|
||||||
|
|
||||||
@ -72,7 +71,6 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
|||||||
image = itemView.findViewById(R.id.imageAvatar);
|
image = itemView.findViewById(R.id.imageAvatar);
|
||||||
repoStars = itemView.findViewById(R.id.repoStars);
|
repoStars = itemView.findViewById(R.id.repoStars);
|
||||||
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
||||||
spacerView = itemView.findViewById(R.id.spacerView);
|
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
|
|
||||||
@ -245,13 +243,10 @@ public class ReposListAdapter extends RecyclerView.Adapter<ReposListAdapter.Repo
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!currentItem.getDescription().equals("")) {
|
if(!currentItem.getDescription().equals("")) {
|
||||||
holder.repoDescription.setVisibility(View.VISIBLE);
|
|
||||||
holder.repoDescription.setText(currentItem.getDescription());
|
holder.repoDescription.setText(currentItem.getDescription());
|
||||||
holder.spacerView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.repoDescription.setVisibility(View.GONE);
|
holder.repoDescription.setText(context.getString(R.string.noDataDescription));
|
||||||
holder.spacerView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(holder.isRepoAdmin == null) {
|
if(holder.isRepoAdmin == null) {
|
||||||
|
@ -60,7 +60,6 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
|||||||
private CheckBox isRepoAdmin;
|
private CheckBox isRepoAdmin;
|
||||||
private final TextView repoStars;
|
private final TextView repoStars;
|
||||||
private final TextView repoLastUpdated;
|
private final TextView repoLastUpdated;
|
||||||
private final View spacerView;
|
|
||||||
|
|
||||||
private OrgReposViewHolder(View itemView) {
|
private OrgReposViewHolder(View itemView) {
|
||||||
|
|
||||||
@ -72,7 +71,6 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
|||||||
image = itemView.findViewById(R.id.imageAvatar);
|
image = itemView.findViewById(R.id.imageAvatar);
|
||||||
repoStars = itemView.findViewById(R.id.repoStars);
|
repoStars = itemView.findViewById(R.id.repoStars);
|
||||||
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
||||||
spacerView = itemView.findViewById(R.id.spacerView);
|
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
|
|
||||||
@ -249,13 +247,10 @@ public class RepositoriesByOrgAdapter extends RecyclerView.Adapter<RepositoriesB
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!currentItem.getDescription().equals("")) {
|
if(!currentItem.getDescription().equals("")) {
|
||||||
holder.repoDescription.setVisibility(View.VISIBLE);
|
|
||||||
holder.repoDescription.setText(currentItem.getDescription());
|
holder.repoDescription.setText(currentItem.getDescription());
|
||||||
holder.spacerView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.repoDescription.setVisibility(View.GONE);
|
holder.repoDescription.setText(context.getString(R.string.noDataDescription));
|
||||||
holder.spacerView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(holder.isRepoAdmin == null) {
|
if(holder.isRepoAdmin == null) {
|
||||||
|
@ -60,7 +60,6 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
|||||||
private CheckBox isRepoAdmin;
|
private CheckBox isRepoAdmin;
|
||||||
private final TextView repoStars;
|
private final TextView repoStars;
|
||||||
private final TextView repoLastUpdated;
|
private final TextView repoLastUpdated;
|
||||||
private final View spacerView;
|
|
||||||
|
|
||||||
private StarredReposViewHolder(View itemView) {
|
private StarredReposViewHolder(View itemView) {
|
||||||
|
|
||||||
@ -72,7 +71,6 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
|||||||
image = itemView.findViewById(R.id.imageAvatar);
|
image = itemView.findViewById(R.id.imageAvatar);
|
||||||
repoStars = itemView.findViewById(R.id.repoStars);
|
repoStars = itemView.findViewById(R.id.repoStars);
|
||||||
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
repoLastUpdated = itemView.findViewById(R.id.repoLastUpdated);
|
||||||
spacerView = itemView.findViewById(R.id.spacerView);
|
|
||||||
|
|
||||||
itemView.setOnClickListener(v -> {
|
itemView.setOnClickListener(v -> {
|
||||||
|
|
||||||
@ -250,13 +248,10 @@ public class StarredReposListAdapter extends RecyclerView.Adapter<StarredReposLi
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!currentItem.getDescription().equals("")) {
|
if(!currentItem.getDescription().equals("")) {
|
||||||
holder.repoDescription.setVisibility(View.VISIBLE);
|
|
||||||
holder.repoDescription.setText(currentItem.getDescription());
|
holder.repoDescription.setText(currentItem.getDescription());
|
||||||
holder.spacerView.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
holder.repoDescription.setVisibility(View.GONE);
|
holder.repoDescription.setText(context.getString(R.string.noDataDescription));
|
||||||
holder.spacerView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(holder.isRepoAdmin == null) {
|
if(holder.isRepoAdmin == null) {
|
||||||
|
@ -9,8 +9,6 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||||
import org.mian.gitnex.databinding.BottomSheetIssuesFilterBinding;
|
import org.mian.gitnex.databinding.BottomSheetIssuesFilterBinding;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
|
||||||
import org.mian.gitnex.helpers.Version;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
@ -25,15 +23,6 @@ public class BottomSheetIssuesFilterFragment extends BottomSheetDialogFragment {
|
|||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
BottomSheetIssuesFilterBinding bottomSheetIssuesFilterBinding = BottomSheetIssuesFilterBinding.inflate(inflater, container, false);
|
BottomSheetIssuesFilterBinding bottomSheetIssuesFilterBinding = BottomSheetIssuesFilterBinding.inflate(inflater, container, false);
|
||||||
TinyDB tinyDb = TinyDB.getInstance(getContext());
|
|
||||||
|
|
||||||
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.14.0")) {
|
|
||||||
bottomSheetIssuesFilterBinding.filterByMilestone.setVisibility(View.VISIBLE);
|
|
||||||
bottomSheetIssuesFilterBinding.filterByMilestone.setOnClickListener(v1 -> {
|
|
||||||
bmListener.onButtonClicked("filterByMilestone");
|
|
||||||
dismiss();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomSheetIssuesFilterBinding.openIssues.setOnClickListener(v1 -> {
|
bottomSheetIssuesFilterBinding.openIssues.setOnClickListener(v1 -> {
|
||||||
bmListener.onButtonClicked("openIssues");
|
bmListener.onButtonClicked("openIssues");
|
||||||
|
@ -5,8 +5,6 @@ import android.content.ClipboardManager;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.view.Gravity;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
@ -15,19 +13,24 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.actions.IssueActions;
|
import org.mian.gitnex.actions.IssueActions;
|
||||||
import org.mian.gitnex.actions.PullRequestActions;
|
import org.mian.gitnex.actions.PullRequestActions;
|
||||||
import org.mian.gitnex.activities.EditIssueActivity;
|
import org.mian.gitnex.activities.EditIssueActivity;
|
||||||
import org.mian.gitnex.activities.FileDiffActivity;
|
import org.mian.gitnex.activities.FileDiffActivity;
|
||||||
import org.mian.gitnex.activities.MergePullRequestActivity;
|
import org.mian.gitnex.activities.MergePullRequestActivity;
|
||||||
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.databinding.BottomSheetSingleIssueBinding;
|
import org.mian.gitnex.databinding.BottomSheetSingleIssueBinding;
|
||||||
import org.mian.gitnex.helpers.AlertDialogs;
|
import org.mian.gitnex.helpers.AlertDialogs;
|
||||||
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import org.mian.gitnex.helpers.Version;
|
import org.mian.gitnex.helpers.Version;
|
||||||
import org.mian.gitnex.views.ReactionSpinner;
|
import org.mian.gitnex.views.ReactionSpinner;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
@ -53,7 +56,6 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
|
|||||||
TextView addRemoveAssignees = bottomSheetSingleIssueBinding.addRemoveAssignees;
|
TextView addRemoveAssignees = bottomSheetSingleIssueBinding.addRemoveAssignees;
|
||||||
TextView copyIssueUrl = bottomSheetSingleIssueBinding.copyIssueUrl;
|
TextView copyIssueUrl = bottomSheetSingleIssueBinding.copyIssueUrl;
|
||||||
TextView openFilesDiff = bottomSheetSingleIssueBinding.openFilesDiff;
|
TextView openFilesDiff = bottomSheetSingleIssueBinding.openFilesDiff;
|
||||||
TextView updatePullRequest = bottomSheetSingleIssueBinding.updatePullRequest;
|
|
||||||
TextView mergePullRequest = bottomSheetSingleIssueBinding.mergePullRequest;
|
TextView mergePullRequest = bottomSheetSingleIssueBinding.mergePullRequest;
|
||||||
TextView deletePullRequestBranch = bottomSheetSingleIssueBinding.deletePrHeadBranch;
|
TextView deletePullRequestBranch = bottomSheetSingleIssueBinding.deletePrHeadBranch;
|
||||||
TextView shareIssue = bottomSheetSingleIssueBinding.shareIssue;
|
TextView shareIssue = bottomSheetSingleIssueBinding.shareIssue;
|
||||||
@ -71,12 +73,6 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
|
|||||||
bundle1.putString("repoName", parts[1]);
|
bundle1.putString("repoName", parts[1]);
|
||||||
bundle1.putInt("issueId", Integer.parseInt(tinyDB.getString("issueNumber")));
|
bundle1.putInt("issueId", Integer.parseInt(tinyDB.getString("issueNumber")));
|
||||||
|
|
||||||
TextView loadReactions = new TextView(ctx);
|
|
||||||
loadReactions.setText(Objects.requireNonNull(ctx).getString(R.string.genericWaitFor));
|
|
||||||
loadReactions.setGravity(Gravity.CENTER);
|
|
||||||
loadReactions.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 160));
|
|
||||||
linearLayout.addView(loadReactions);
|
|
||||||
|
|
||||||
ReactionSpinner reactionSpinner = new ReactionSpinner(ctx, bundle1);
|
ReactionSpinner reactionSpinner = new ReactionSpinner(ctx, bundle1);
|
||||||
reactionSpinner.setOnInteractedListener(() -> {
|
reactionSpinner.setOnInteractedListener(() -> {
|
||||||
|
|
||||||
@ -84,14 +80,10 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
|
|||||||
|
|
||||||
bmListener.onButtonClicked("onResume");
|
bmListener.onButtonClicked("onResume");
|
||||||
dismiss();
|
dismiss();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Handler handler = new Handler();
|
|
||||||
handler.postDelayed(() -> {
|
|
||||||
linearLayout.removeView(loadReactions);
|
|
||||||
reactionSpinner.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, 160));
|
|
||||||
linearLayout.addView(reactionSpinner);
|
linearLayout.addView(reactionSpinner);
|
||||||
}, 2500);
|
|
||||||
|
|
||||||
if(tinyDB.getString("issueType").equalsIgnoreCase("Pull")) {
|
if(tinyDB.getString("issueType").equalsIgnoreCase("Pull")) {
|
||||||
|
|
||||||
@ -100,12 +92,10 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
|
|||||||
shareIssue.setText(R.string.sharePr);
|
shareIssue.setText(R.string.sharePr);
|
||||||
|
|
||||||
if(tinyDB.getBoolean("prMerged") || tinyDB.getString("repoPrState").equals("closed")) {
|
if(tinyDB.getBoolean("prMerged") || tinyDB.getString("repoPrState").equals("closed")) {
|
||||||
updatePullRequest.setVisibility(View.GONE);
|
|
||||||
mergePullRequest.setVisibility(View.GONE);
|
mergePullRequest.setVisibility(View.GONE);
|
||||||
deletePullRequestBranch.setVisibility(View.VISIBLE);
|
deletePullRequestBranch.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
updatePullRequest.setVisibility(View.VISIBLE);
|
|
||||||
mergePullRequest.setVisibility(View.VISIBLE);
|
mergePullRequest.setVisibility(View.VISIBLE);
|
||||||
deletePullRequestBranch.setVisibility(View.GONE);
|
deletePullRequestBranch.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
@ -123,21 +113,10 @@ public class BottomSheetSingleIssueFragment extends BottomSheetDialogFragment {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
updatePullRequest.setVisibility(View.GONE);
|
|
||||||
mergePullRequest.setVisibility(View.GONE);
|
mergePullRequest.setVisibility(View.GONE);
|
||||||
deletePullRequestBranch.setVisibility(View.GONE);
|
deletePullRequestBranch.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePullRequest.setOnClickListener(v -> {
|
|
||||||
if(new Version(tinyDB.getString("giteaVersion")).higherOrEqual("1.16.0")) {
|
|
||||||
AlertDialogs.selectPullUpdateStrategy(requireContext(), parts[0], parts[1], tinyDB.getString("issueNumber"));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
PullRequestActions.updatePr(requireContext(), parts[0], parts[1], tinyDB.getString("issueNumber"), null);
|
|
||||||
}
|
|
||||||
dismiss();
|
|
||||||
});
|
|
||||||
|
|
||||||
mergePullRequest.setOnClickListener(v13 -> {
|
mergePullRequest.setOnClickListener(v13 -> {
|
||||||
|
|
||||||
startActivity(new Intent(ctx, MergePullRequestActivity.class));
|
startActivity(new Intent(ctx, MergePullRequestActivity.class));
|
||||||
|
@ -1,70 +0,0 @@
|
|||||||
package org.mian.gitnex.fragments;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.graphics.drawable.Drawable;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.annotation.Nullable;
|
|
||||||
import androidx.appcompat.content.res.AppCompatResources;
|
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.databinding.BottomSheetUserProfileBinding;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Template Author M M Arif
|
|
||||||
* @author qwerty287
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class BottomSheetUserProfileFragment extends BottomSheetDialogFragment {
|
|
||||||
|
|
||||||
private final boolean following;
|
|
||||||
|
|
||||||
public BottomSheetUserProfileFragment(boolean following) {
|
|
||||||
this.following = following;
|
|
||||||
}
|
|
||||||
|
|
||||||
private BottomSheetUserProfileFragment.BottomSheetListener bmListener;
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
||||||
|
|
||||||
BottomSheetUserProfileBinding bottomSheetUserProfileBinding = BottomSheetUserProfileBinding.inflate(inflater, container, false);
|
|
||||||
|
|
||||||
if(following) {
|
|
||||||
bottomSheetUserProfileBinding.followUnfollowUser.setText(R.string.unfollowUser);
|
|
||||||
Drawable drawable = AppCompatResources.getDrawable(requireContext(), R.drawable.ic_person_remove); assert drawable != null;
|
|
||||||
drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight());
|
|
||||||
bottomSheetUserProfileBinding.followUnfollowUser.setCompoundDrawablesRelative(drawable, null, null, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
bottomSheetUserProfileBinding.followUnfollowUser.setOnClickListener(v1 -> {
|
|
||||||
|
|
||||||
bmListener.onButtonClicked("follow");
|
|
||||||
dismiss();
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
return bottomSheetUserProfileBinding.getRoot();
|
|
||||||
}
|
|
||||||
|
|
||||||
public interface BottomSheetListener {
|
|
||||||
void onButtonClicked(String text);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onAttach(@NonNull Context context) {
|
|
||||||
super.onAttach(context);
|
|
||||||
|
|
||||||
try {
|
|
||||||
bmListener = (BottomSheetUserProfileFragment.BottomSheetListener) context;
|
|
||||||
}
|
|
||||||
catch (ClassCastException e) {
|
|
||||||
throw new ClassCastException(context.toString() + " must implement BottomSheetListener");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -10,10 +10,10 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.viewpager2.widget.ViewPager2;
|
import androidx.fragment.app.FragmentPagerAdapter;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
import com.google.android.material.tabs.TabLayout;
|
import com.google.android.material.tabs.TabLayout;
|
||||||
import com.google.android.material.tabs.TabLayoutMediator;
|
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.MainActivity;
|
import org.mian.gitnex.activities.MainActivity;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
@ -24,6 +24,9 @@ import org.mian.gitnex.helpers.TinyDB;
|
|||||||
|
|
||||||
public class ExploreFragment extends Fragment {
|
public class ExploreFragment extends Fragment {
|
||||||
|
|
||||||
|
private int tabsCount;
|
||||||
|
public ViewPager mViewPager;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
@ -33,81 +36,101 @@ public class ExploreFragment extends Fragment {
|
|||||||
Context ctx = getContext();
|
Context ctx = getContext();
|
||||||
TinyDB tinyDB = TinyDB.getInstance(ctx);
|
TinyDB tinyDB = TinyDB.getInstance(ctx);
|
||||||
|
|
||||||
((MainActivity) requireActivity()).setActionBarTitle(getResources().getString(R.string.pageTitleExplore));
|
((MainActivity) requireActivity()).setActionBarTitle(getResources().getString(R.string.navExplore));
|
||||||
|
|
||||||
ViewPager2 viewPager = view.findViewById(R.id.containerExplore);
|
|
||||||
viewPager.setOffscreenPageLimit(1);
|
|
||||||
TabLayout tabLayout = view.findViewById(R.id.tabsExplore);
|
TabLayout tabLayout = view.findViewById(R.id.tabsExplore);
|
||||||
|
|
||||||
ViewGroup vg = (ViewGroup) tabLayout.getChildAt(0);
|
ViewGroup viewGroup = (ViewGroup) tabLayout.getChildAt(0);
|
||||||
|
tabsCount = viewGroup.getChildCount();
|
||||||
|
|
||||||
Typeface myTypeface;
|
Typeface myTypeface;
|
||||||
|
|
||||||
switch(tinyDB.getInt("customFontId", -1)) {
|
switch(tinyDB.getInt("customFontId", -1)) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
myTypeface = Typeface.createFromAsset(ctx != null ? ctx.getAssets() : null, "fonts/roboto.ttf");
|
myTypeface = Typeface.createFromAsset(ctx.getAssets(), "fonts/roboto.ttf");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
myTypeface = Typeface.createFromAsset(ctx != null ? ctx.getAssets() : null, "fonts/sourcecodeproregular.ttf");
|
myTypeface = Typeface.createFromAsset(ctx.getAssets(), "fonts/sourcecodeproregular.ttf");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
myTypeface = Typeface.createFromAsset(ctx != null ? ctx.getAssets() : null, "fonts/manroperegular.ttf");
|
myTypeface = Typeface.createFromAsset(ctx.getAssets(), "fonts/manroperegular.ttf");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
viewPager.setAdapter(new ViewPagerAdapter(this));
|
for(int j = 0; j < tabsCount; j++) {
|
||||||
|
|
||||||
String[] tabTitles = {getResources().getString(R.string.pageTitleRepositories), getResources().getString(R.string.pageTitleIssues), getResources().getString(R.string.pageTitleOrganizations), getResources().getString(R.string.pageTitleUsers)};
|
ViewGroup vgTab = (ViewGroup) viewGroup.getChildAt(j);
|
||||||
new TabLayoutMediator(tabLayout, viewPager, (tab, position) -> tab.setText(tabTitles[position])).attach();
|
|
||||||
|
|
||||||
for (int j = 0; j < tabTitles.length; j++) {
|
|
||||||
|
|
||||||
ViewGroup vgTab = (ViewGroup) vg.getChildAt(j);
|
|
||||||
int tabChildCount = vgTab.getChildCount();
|
int tabChildCount = vgTab.getChildCount();
|
||||||
|
|
||||||
for (int i = 0; i < tabChildCount; i++) {
|
for(int i = 0; i < tabChildCount; i++) {
|
||||||
|
|
||||||
View tabViewChild = vgTab.getChildAt(i);
|
View tabViewChild = vgTab.getChildAt(i);
|
||||||
if (tabViewChild instanceof TextView) {
|
|
||||||
|
if(tabViewChild instanceof TextView) {
|
||||||
((TextView) tabViewChild).setTypeface(myTypeface);
|
((TextView) tabViewChild).setTypeface(myTypeface);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return view;
|
mViewPager = view.findViewById(R.id.containerExplore);
|
||||||
|
|
||||||
|
mViewPager.addOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
|
||||||
|
tabLayout.addOnTabSelectedListener(new TabLayout.ViewPagerOnTabSelectedListener(mViewPager));
|
||||||
|
|
||||||
|
SectionsPagerAdapter mSectionsPagerAdapter = new SectionsPagerAdapter(getChildFragmentManager());
|
||||||
|
mViewPager.setAdapter(mSectionsPagerAdapter);
|
||||||
|
|
||||||
|
if(requireActivity().getIntent().getBooleanExtra("exploreOrgs", false)) {
|
||||||
|
mViewPager.setCurrentItem(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ViewPagerAdapter extends FragmentStateAdapter {
|
return view;
|
||||||
|
|
||||||
public ViewPagerAdapter(@NonNull ExploreFragment fa) { super(fa); }
|
}
|
||||||
|
|
||||||
|
public class SectionsPagerAdapter extends FragmentPagerAdapter {
|
||||||
|
|
||||||
|
SectionsPagerAdapter(FragmentManager fm) {
|
||||||
|
|
||||||
|
super(fm, BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT);
|
||||||
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public Fragment createFragment(int position) {
|
public Fragment getItem(int position) {
|
||||||
|
|
||||||
Fragment fragment = null;
|
Fragment fragment = null;
|
||||||
|
|
||||||
switch(position) {
|
switch(position) {
|
||||||
|
|
||||||
case 0: // Repositories
|
case 0: // Repositories
|
||||||
fragment = new ExploreRepositoriesFragment();
|
fragment = new ExploreRepositoriesFragment();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: // Issues
|
case 1: // Issues
|
||||||
fragment = new ExploreIssuesFragment();
|
fragment = new ExploreIssuesFragment();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2: // Organizations
|
case 2: // Organizations
|
||||||
fragment = new ExplorePublicOrganizationsFragment();
|
fragment = new ExplorePublicOrganizationsFragment();
|
||||||
break;
|
break;
|
||||||
case 3: // Users
|
|
||||||
fragment = new ExploreUsersFragment();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert fragment != null;
|
assert fragment != null;
|
||||||
return fragment;
|
return fragment;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getItemCount() {
|
public int getCount() {
|
||||||
return 4;
|
|
||||||
|
return tabsCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,6 @@ package org.mian.gitnex.fragments;
|
|||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Looper;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@ -15,13 +13,12 @@ import androidx.fragment.app.Fragment;
|
|||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import org.gitnex.tea4j.models.Issues;
|
import org.gitnex.tea4j.models.Issues;
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.adapters.ExploreIssuesAdapter;
|
import org.mian.gitnex.adapters.ExploreIssuesAdapter;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.databinding.FragmentSearchIssuesBinding;
|
import org.mian.gitnex.databinding.FragmentSearchIssuesBinding;
|
||||||
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.InfiniteScrollListener;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -36,22 +33,30 @@ import retrofit2.Response;
|
|||||||
public class ExploreIssuesFragment extends Fragment {
|
public class ExploreIssuesFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentSearchIssuesBinding viewBinding;
|
private FragmentSearchIssuesBinding viewBinding;
|
||||||
private Context context;
|
|
||||||
|
|
||||||
private List<Issues> dataList;
|
|
||||||
private ExploreIssuesAdapter adapter;
|
private ExploreIssuesAdapter adapter;
|
||||||
private int pageSize;
|
private List<Issues> dataList;
|
||||||
private final String TAG = Constants.exploreIssues;
|
Context ctx;
|
||||||
private final int resultLimit = Constants.resultLimitOldGiteaInstances; // search issues always return 10 records
|
|
||||||
|
private int apiCallCurrentValue = 10;
|
||||||
|
private int pageCurrentIndex = 1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
||||||
|
|
||||||
viewBinding = FragmentSearchIssuesBinding.inflate(inflater, container, false);
|
viewBinding = FragmentSearchIssuesBinding.inflate(inflater, container, false);
|
||||||
context = getContext();
|
setHasOptionsMenu(true);
|
||||||
|
ctx = getContext();
|
||||||
|
|
||||||
dataList = new ArrayList<>();
|
dataList = new ArrayList<>();
|
||||||
adapter = new ExploreIssuesAdapter(dataList, context);
|
adapter = new ExploreIssuesAdapter(dataList, ctx);
|
||||||
|
|
||||||
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(ctx);
|
||||||
|
|
||||||
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(viewBinding.recyclerViewSearchIssues.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
|
viewBinding.recyclerViewSearchIssues.addItemDecoration(dividerItemDecoration);
|
||||||
|
viewBinding.recyclerViewSearchIssues.setHasFixedSize(true);
|
||||||
|
viewBinding.recyclerViewSearchIssues.setLayoutManager(linearLayoutManager);
|
||||||
|
viewBinding.recyclerViewSearchIssues.setAdapter(adapter);
|
||||||
|
|
||||||
viewBinding.searchKeyword.setOnEditorActionListener((v1, actionId, event) -> {
|
viewBinding.searchKeyword.setOnEditorActionListener((v1, actionId, event) -> {
|
||||||
if(actionId == EditorInfo.IME_ACTION_SEND) {
|
if(actionId == EditorInfo.IME_ACTION_SEND) {
|
||||||
@ -59,111 +64,87 @@ public class ExploreIssuesFragment extends Fragment {
|
|||||||
InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(viewBinding.searchKeyword.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(viewBinding.searchKeyword.getWindowToken(), 0);
|
||||||
|
|
||||||
|
pageCurrentIndex = 1;
|
||||||
|
apiCallCurrentValue = 10;
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
||||||
loadInitial(String.valueOf(viewBinding.searchKeyword.getText()), resultLimit);
|
loadData(false, viewBinding.searchKeyword.getText().toString());
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerViewSearchIssues.post(() -> {
|
|
||||||
if(dataList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (dataList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(String.valueOf(viewBinding.searchKeyword.getText()), resultLimit, page);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
viewBinding.recyclerViewSearchIssues.addOnScrollListener(new InfiniteScrollListener(pageCurrentIndex, linearLayoutManager) {
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
@Override
|
||||||
loadInitial("", resultLimit);
|
public void onScrolledToEnd(int firstVisibleItemPosition) {
|
||||||
adapter.notifyDataChanged();
|
pageCurrentIndex++;
|
||||||
}, 200));
|
loadData(true, Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString());
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerViewSearchIssues.post(() -> {
|
|
||||||
if(dataList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (dataList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(String.valueOf(viewBinding.searchKeyword.getText()), resultLimit, page);
|
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
viewBinding.pullToRefresh.setOnRefreshListener(() -> {
|
||||||
viewBinding.recyclerViewSearchIssues.setHasFixedSize(true);
|
pageCurrentIndex = 1;
|
||||||
viewBinding.recyclerViewSearchIssues.addItemDecoration(dividerItemDecoration);
|
apiCallCurrentValue = 10;
|
||||||
viewBinding.recyclerViewSearchIssues.setLayoutManager(new LinearLayoutManager(context));
|
loadData(false, Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString());
|
||||||
viewBinding.recyclerViewSearchIssues.setAdapter(adapter);
|
});
|
||||||
|
|
||||||
loadInitial("", resultLimit);
|
loadData(false, "");
|
||||||
|
|
||||||
return viewBinding.getRoot();
|
return viewBinding.getRoot();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadInitial(String searchKeyword, int resultLimit) {
|
private void loadData(boolean append, String searchKeyword) {
|
||||||
|
|
||||||
Call<List<Issues>> call = RetrofitClient
|
|
||||||
.getApiInterface(context).queryIssues(Authorization.get(getContext()), searchKeyword, "issues", "open", resultLimit, 1);
|
|
||||||
call.enqueue(new Callback<List<Issues>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<List<Issues>> call, @NonNull Response<List<Issues>> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
if(response.body() != null && response.body().size() > 0) {
|
|
||||||
dataList.clear();
|
|
||||||
dataList.addAll(response.body());
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.GONE);
|
viewBinding.noData.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
int apiCallDefaultLimit = 10;
|
||||||
|
if(apiCallDefaultLimit > apiCallCurrentValue) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pageCurrentIndex == 1 || !append) {
|
||||||
|
dataList.clear();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
viewBinding.pullToRefresh.setRefreshing(false);
|
||||||
|
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
viewBinding.loadingMoreView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
Call<List<Issues>> call = RetrofitClient.getApiInterface(getContext())
|
||||||
|
.queryIssues(Authorization.get(getContext()), searchKeyword, "issues", "open", pageCurrentIndex);
|
||||||
|
|
||||||
|
call.enqueue(new Callback<List<Issues>>() {
|
||||||
|
@Override
|
||||||
|
public void onResponse(@NonNull Call<List<Issues>> call, @NonNull Response<List<Issues>> response) {
|
||||||
|
if(response.code() == 200) {
|
||||||
|
assert response.body() != null;
|
||||||
|
apiCallCurrentValue = response.body().size();
|
||||||
|
if(!append) {
|
||||||
|
dataList.clear();
|
||||||
|
}
|
||||||
|
dataList.addAll(response.body());
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dataList.clear();
|
dataList.clear();
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
viewBinding.noData.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
onCleanup();
|
||||||
}
|
}
|
||||||
else if(response.code() == 404) {
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call<List<Issues>> call, @NonNull Throwable t) {
|
||||||
|
Log.e("onFailure", Objects.requireNonNull(t.getMessage()));
|
||||||
|
onCleanup();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onCleanup() {
|
||||||
|
AppUtil.setMultiVisibility(View.GONE, viewBinding.loadingMoreView, viewBinding.progressBar);
|
||||||
|
if(dataList.isEmpty()) {
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
viewBinding.noData.setVisibility(View.VISIBLE);
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<List<Issues>> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadMore(String searchKeyword, int resultLimit, int page) {
|
|
||||||
|
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
|
||||||
Call<List<Issues>> call = RetrofitClient.getApiInterface(context)
|
|
||||||
.queryIssues(Authorization.get(getContext()), searchKeyword, "issues", "open", resultLimit, page);
|
|
||||||
call.enqueue(new Callback<List<Issues>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<List<Issues>> call, @NonNull Response<List<Issues>> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
assert response.body() != null;
|
|
||||||
List<Issues> result = response.body();
|
|
||||||
if(result.size() > 0) {
|
|
||||||
pageSize = result.size();
|
|
||||||
dataList.addAll(result);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SnackBar.info(context, viewBinding.getRoot(), getString(R.string.noMoreData));
|
|
||||||
adapter.setMoreDataAvailable(false);
|
|
||||||
}
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<List<Issues>> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ import org.mian.gitnex.helpers.Authorization;
|
|||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.SnackBar;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -40,7 +41,7 @@ public class ExplorePublicOrganizationsFragment extends Fragment {
|
|||||||
private Context context;
|
private Context context;
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private final String TAG = Constants.publicOrganizations;
|
private final String TAG = Constants.publicOrganizations;
|
||||||
private int resultLimit;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
@ -53,7 +54,10 @@ public class ExplorePublicOrganizationsFragment extends Fragment {
|
|||||||
final String loginUid = tinyDb.getString("loginUid");
|
final String loginUid = tinyDb.getString("loginUid");
|
||||||
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
|
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
fragmentPublicOrgBinding.addNewOrganization.setVisibility(View.GONE);
|
fragmentPublicOrgBinding.addNewOrganization.setVisibility(View.GONE);
|
||||||
organizationsList = new ArrayList<>();
|
organizationsList = new ArrayList<>();
|
||||||
@ -122,7 +126,7 @@ public class ExplorePublicOrganizationsFragment extends Fragment {
|
|||||||
|
|
||||||
private void loadMore(String token, int page, int resultLimit) {
|
private void loadMore(String token, int page, int resultLimit) {
|
||||||
|
|
||||||
fragmentPublicOrgBinding.progressBar.setVisibility(View.VISIBLE);
|
fragmentPublicOrgBinding.progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
Call<List<Organization>> call = RetrofitClient.getApiInterface(context).getAllOrgs(token, page, resultLimit);
|
Call<List<Organization>> call = RetrofitClient.getApiInterface(context).getAllOrgs(token, page, resultLimit);
|
||||||
call.enqueue(new Callback<List<Organization>>() {
|
call.enqueue(new Callback<List<Organization>>() {
|
||||||
@Override
|
@Override
|
||||||
@ -140,7 +144,7 @@ public class ExplorePublicOrganizationsFragment extends Fragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentPublicOrgBinding.progressBar.setVisibility(View.GONE);
|
fragmentPublicOrgBinding.progressLoadMore.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
Log.e(TAG, String.valueOf(response.code()));
|
||||||
|
@ -6,8 +6,6 @@ import android.graphics.Color;
|
|||||||
import android.graphics.drawable.ColorDrawable;
|
import android.graphics.drawable.ColorDrawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Looper;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -28,10 +26,12 @@ import org.mian.gitnex.adapters.ExploreRepositoriesAdapter;
|
|||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.databinding.CustomExploreRepositoriesDialogBinding;
|
import org.mian.gitnex.databinding.CustomExploreRepositoriesDialogBinding;
|
||||||
import org.mian.gitnex.databinding.FragmentExploreRepoBinding;
|
import org.mian.gitnex.databinding.FragmentExploreRepoBinding;
|
||||||
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.InfiniteScrollListener;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -42,21 +42,19 @@ import retrofit2.Response;
|
|||||||
/**
|
/**
|
||||||
* Template Author M M Arif
|
* Template Author M M Arif
|
||||||
* Author 6543
|
* Author 6543
|
||||||
* Modified M M Arif
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class ExploreRepositoriesFragment extends Fragment {
|
public class ExploreRepositoriesFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentExploreRepoBinding viewBinding;
|
private FragmentExploreRepoBinding viewBinding;
|
||||||
private Context context;
|
private Context ctx;
|
||||||
private TinyDB tinyDb;
|
private TinyDB tinyDb;
|
||||||
|
|
||||||
private int pageSize;
|
private int pageCurrentIndex = 1;
|
||||||
private final boolean repoTypeInclude = true;
|
private boolean repoTypeInclude = true;
|
||||||
private final String sort = "updated";
|
private String sort = "updated";
|
||||||
private final String order = "desc";
|
private String order = "desc";
|
||||||
private final String TAG = Constants.exploreRepositories;
|
private int limit = 10;
|
||||||
private int resultLimit;
|
|
||||||
private List<UserRepositories> dataList;
|
private List<UserRepositories> dataList;
|
||||||
private ExploreRepositoriesAdapter adapter;
|
private ExploreRepositoriesAdapter adapter;
|
||||||
|
|
||||||
@ -69,130 +67,164 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
viewBinding = FragmentExploreRepoBinding.inflate(inflater, container, false);
|
viewBinding = FragmentExploreRepoBinding.inflate(inflater, container, false);
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
context = getContext();
|
ctx = getContext();
|
||||||
tinyDb = TinyDB.getInstance(getContext());
|
tinyDb = TinyDB.getInstance(getContext());
|
||||||
|
|
||||||
dataList = new ArrayList<>();
|
dataList = new ArrayList<>();
|
||||||
adapter = new ExploreRepositoriesAdapter(dataList, context);
|
adapter = new ExploreRepositoriesAdapter(dataList, ctx);
|
||||||
|
|
||||||
tinyDb.putBoolean("exploreRepoIncludeTopic", false);
|
tinyDb.putBoolean("exploreRepoIncludeTopic", false);
|
||||||
tinyDb.putBoolean("exploreRepoIncludeDescription", false);
|
tinyDb.putBoolean("exploreRepoIncludeDescription", false);
|
||||||
tinyDb.putBoolean("exploreRepoIncludeTemplate", false);
|
tinyDb.putBoolean("exploreRepoIncludeTemplate", false);
|
||||||
tinyDb.putBoolean("exploreRepoOnlyArchived", false);
|
tinyDb.putBoolean("exploreRepoOnlyArchived", false);
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
limit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(ctx);
|
||||||
|
|
||||||
|
viewBinding.recyclerViewReposSearch.setHasFixedSize(true);
|
||||||
|
viewBinding.recyclerViewReposSearch.setLayoutManager(linearLayoutManager);
|
||||||
|
viewBinding.recyclerViewReposSearch.setAdapter(adapter);
|
||||||
|
|
||||||
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(viewBinding.recyclerViewReposSearch.getContext(),
|
||||||
|
DividerItemDecoration.VERTICAL);
|
||||||
|
viewBinding.recyclerViewReposSearch.addItemDecoration(dividerItemDecoration);
|
||||||
|
|
||||||
viewBinding.searchKeyword.setOnEditorActionListener((v1, actionId, event) -> {
|
viewBinding.searchKeyword.setOnEditorActionListener((v1, actionId, event) -> {
|
||||||
|
|
||||||
if(actionId == EditorInfo.IME_ACTION_SEND) {
|
if(actionId == EditorInfo.IME_ACTION_SEND) {
|
||||||
|
|
||||||
if(!Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString().equals("")) {
|
if(!Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString().equals("")) {
|
||||||
|
|
||||||
InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||||
imm.hideSoftInputFromWindow(viewBinding.searchKeyword.getWindowToken(), 0);
|
imm.hideSoftInputFromWindow(viewBinding.searchKeyword.getWindowToken(), 0);
|
||||||
|
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
// if gitea is 1.12 or higher use the new limit
|
||||||
loadInitial(String.valueOf(viewBinding.searchKeyword.getText()), tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"), resultLimit);
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
limit = Constants.resultLimitNewGiteaInstances;
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerViewReposSearch.post(() -> {
|
|
||||||
if(dataList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (dataList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(String.valueOf(viewBinding.searchKeyword.getText()), tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"), resultLimit, page);
|
|
||||||
}
|
}
|
||||||
}));
|
else {
|
||||||
|
limit = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
pageCurrentIndex = 1;
|
||||||
|
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
||||||
|
loadData(false, viewBinding.searchKeyword.getText().toString(), tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
viewBinding.recyclerViewReposSearch.addOnScrollListener(new InfiniteScrollListener(pageCurrentIndex, linearLayoutManager) {
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
|
||||||
loadInitial("", tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"), resultLimit);
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
}, 200));
|
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerViewReposSearch.post(() -> {
|
|
||||||
if(dataList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (dataList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(String.valueOf(viewBinding.searchKeyword.getText()), tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"), resultLimit, page);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
|
||||||
viewBinding.recyclerViewReposSearch.setHasFixedSize(true);
|
|
||||||
viewBinding.recyclerViewReposSearch.addItemDecoration(dividerItemDecoration);
|
|
||||||
viewBinding.recyclerViewReposSearch.setLayoutManager(new LinearLayoutManager(context));
|
|
||||||
viewBinding.recyclerViewReposSearch.setAdapter(adapter);
|
|
||||||
|
|
||||||
loadInitial("", tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"), resultLimit);
|
|
||||||
|
|
||||||
return viewBinding.getRoot();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadInitial(String searchKeyword, boolean exploreRepoIncludeTopic, boolean exploreRepoIncludeDescription, boolean exploreRepoIncludeTemplate, boolean exploreRepoOnlyArchived, int resultLimit) {
|
|
||||||
|
|
||||||
Call<ExploreRepositories> call = RetrofitClient
|
|
||||||
.getApiInterface(context).queryRepos(Authorization.get(getContext()), searchKeyword, repoTypeInclude, sort, order, exploreRepoIncludeTopic, exploreRepoIncludeDescription, exploreRepoIncludeTemplate, exploreRepoOnlyArchived, resultLimit, 1);
|
|
||||||
call.enqueue(new Callback<ExploreRepositories>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<ExploreRepositories> call, @NonNull Response<ExploreRepositories> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
if(response.body() != null && response.body().getSearchedData().size() > 0) {
|
|
||||||
dataList.clear();
|
|
||||||
dataList.addAll(response.body().getSearchedData());
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
dataList.clear();
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else if(response.code() == 404) {
|
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<ExploreRepositories> call, @NonNull Throwable t) {
|
public void onScrolledToEnd(int firstVisibleItemPosition) {
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
|
pageCurrentIndex++;
|
||||||
|
loadData(true, Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString(), tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
viewBinding.pullToRefresh.setOnRefreshListener(() -> {
|
||||||
|
|
||||||
|
pageCurrentIndex = 1;
|
||||||
|
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
limit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
limit = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadMore(String searchKeyword, boolean exploreRepoIncludeTopic, boolean exploreRepoIncludeDescription, boolean exploreRepoIncludeTemplate, boolean exploreRepoOnlyArchived, int resultLimit, int page) {
|
loadData(false, Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString(), tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"));
|
||||||
|
});
|
||||||
|
|
||||||
|
loadData(false, "", tinyDb.getBoolean("exploreRepoIncludeTopic"), tinyDb.getBoolean("exploreRepoIncludeDescription"), tinyDb.getBoolean("exploreRepoIncludeTemplate"), tinyDb.getBoolean("exploreRepoOnlyArchived"));
|
||||||
|
|
||||||
|
return viewBinding.getRoot();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadData(boolean append, String searchKeyword, boolean exploreRepoIncludeTopic, boolean exploreRepoIncludeDescription, boolean exploreRepoIncludeTemplate, boolean exploreRepoOnlyArchived) {
|
||||||
|
|
||||||
|
viewBinding.noData.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
int apiCallDefaultLimit = 10;
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
apiCallDefaultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(apiCallDefaultLimit > limit) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pageCurrentIndex == 1 || !append) {
|
||||||
|
|
||||||
|
dataList.clear();
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
viewBinding.pullToRefresh.setRefreshing(false);
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
||||||
Call<ExploreRepositories> call = RetrofitClient.getApiInterface(context)
|
}
|
||||||
.queryRepos(Authorization.get(getContext()), searchKeyword, repoTypeInclude, sort, order, exploreRepoIncludeTopic, exploreRepoIncludeDescription, exploreRepoIncludeTemplate, exploreRepoOnlyArchived, resultLimit, page);
|
else {
|
||||||
|
|
||||||
|
viewBinding.loadingMoreView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
Call<ExploreRepositories> call = RetrofitClient.getApiInterface(ctx).queryRepos(Authorization.get(getContext()), searchKeyword, repoTypeInclude, sort, order, exploreRepoIncludeTopic, exploreRepoIncludeDescription, exploreRepoIncludeTemplate, exploreRepoOnlyArchived, limit, pageCurrentIndex);
|
||||||
|
|
||||||
call.enqueue(new Callback<ExploreRepositories>() {
|
call.enqueue(new Callback<ExploreRepositories>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<ExploreRepositories> call, @NonNull Response<ExploreRepositories> response) {
|
public void onResponse(@NonNull Call<ExploreRepositories> call, @NonNull Response<ExploreRepositories> response) {
|
||||||
if(response.isSuccessful()) {
|
|
||||||
|
if(response.code() == 200) {
|
||||||
|
|
||||||
assert response.body() != null;
|
assert response.body() != null;
|
||||||
List<UserRepositories> result = response.body().getSearchedData();
|
|
||||||
if(result.size() > 0) {
|
limit = response.body().getSearchedData().size();
|
||||||
pageSize = result.size();
|
|
||||||
dataList.addAll(result);
|
if(!append) {
|
||||||
|
|
||||||
|
dataList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
dataList.addAll(response.body().getSearchedData());
|
||||||
|
adapter.notifyDataSetChanged();
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SnackBar.info(context, viewBinding.getRoot(), getString(R.string.noMoreData));
|
|
||||||
adapter.setMoreDataAvailable(false);
|
dataList.clear();
|
||||||
}
|
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
viewBinding.noData.setVisibility(View.VISIBLE);
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onCleanup();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<ExploreRepositories> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<ExploreRepositories> call, @NonNull Throwable t) {
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
|
Log.e("onFailure", Objects.requireNonNull(t.getMessage()));
|
||||||
|
onCleanup();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void onCleanup() {
|
||||||
|
|
||||||
|
AppUtil.setMultiVisibility(View.GONE, viewBinding.loadingMoreView, viewBinding.progressBar);
|
||||||
|
|
||||||
|
if(dataList.isEmpty()) {
|
||||||
|
|
||||||
|
viewBinding.noData.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -203,6 +235,7 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
menu.clear();
|
menu.clear();
|
||||||
inflater.inflate(R.menu.filter_menu, menu);
|
inflater.inflate(R.menu.filter_menu, menu);
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
|
||||||
MenuItem filter = menu.findItem(R.id.filter);
|
MenuItem filter = menu.findItem(R.id.filter);
|
||||||
|
|
||||||
filter.setOnMenuItemClickListener(filter_ -> {
|
filter.setOnMenuItemClickListener(filter_ -> {
|
||||||
@ -210,17 +243,19 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
showFilterOptions();
|
showFilterOptions();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showFilterOptions() {
|
private void showFilterOptions() {
|
||||||
|
|
||||||
dialogFilterOptions = new Dialog(context, R.style.ThemeOverlay_MaterialComponents_Dialog_Alert);
|
dialogFilterOptions = new Dialog(ctx, R.style.ThemeOverlay_MaterialComponents_Dialog_Alert);
|
||||||
|
|
||||||
if (dialogFilterOptions.getWindow() != null) {
|
if (dialogFilterOptions.getWindow() != null) {
|
||||||
|
|
||||||
dialogFilterOptions.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
dialogFilterOptions.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
||||||
}
|
}
|
||||||
|
|
||||||
filterBinding = CustomExploreRepositoriesDialogBinding.inflate(LayoutInflater.from(context));
|
filterBinding = CustomExploreRepositoriesDialogBinding.inflate(LayoutInflater.from(ctx));
|
||||||
|
|
||||||
View view = filterBinding.getRoot();
|
View view = filterBinding.getRoot();
|
||||||
dialogFilterOptions.setContentView(view);
|
dialogFilterOptions.setContentView(view);
|
||||||
@ -255,10 +290,13 @@ public class ExploreRepositoriesFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDetach() {
|
public void onDetach() {
|
||||||
|
|
||||||
super.onDetach();
|
super.onDetach();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface OnFragmentInteractionListener {
|
public interface OnFragmentInteractionListener {
|
||||||
|
|
||||||
void onFragmentInteraction(Uri uri);
|
void onFragmentInteraction(Uri uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,176 +0,0 @@
|
|||||||
package org.mian.gitnex.fragments;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Looper;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
import android.view.inputmethod.EditorInfo;
|
|
||||||
import android.view.inputmethod.InputMethodManager;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.fragment.app.Fragment;
|
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
import org.gitnex.tea4j.models.UserInfo;
|
|
||||||
import org.gitnex.tea4j.models.UserSearch;
|
|
||||||
import org.mian.gitnex.R;
|
|
||||||
import org.mian.gitnex.adapters.ExploreUsersAdapter;
|
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
|
||||||
import org.mian.gitnex.databinding.FragmentExploreUsersBinding;
|
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
|
||||||
import org.mian.gitnex.helpers.Constants;
|
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
|
||||||
import org.mian.gitnex.helpers.Version;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Callback;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Author M M Arif
|
|
||||||
*/
|
|
||||||
|
|
||||||
public class ExploreUsersFragment extends Fragment {
|
|
||||||
|
|
||||||
private FragmentExploreUsersBinding viewBinding;
|
|
||||||
private Context context;
|
|
||||||
|
|
||||||
private List<UserInfo> usersList;
|
|
||||||
private ExploreUsersAdapter adapter;
|
|
||||||
private int pageSize;
|
|
||||||
private final String TAG = Constants.exploreUsers;
|
|
||||||
private int resultLimit;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
|
||||||
|
|
||||||
viewBinding = FragmentExploreUsersBinding.inflate(inflater, container, false);
|
|
||||||
context = getContext();
|
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
|
||||||
|
|
||||||
usersList = new ArrayList<>();
|
|
||||||
adapter = new ExploreUsersAdapter(context, usersList);
|
|
||||||
|
|
||||||
viewBinding.searchKeyword.setOnEditorActionListener((v1, actionId, event) -> {
|
|
||||||
if(actionId == EditorInfo.IME_ACTION_SEND) {
|
|
||||||
if(!Objects.requireNonNull(viewBinding.searchKeyword.getText()).toString().equals("")) {
|
|
||||||
InputMethodManager imm = (InputMethodManager) requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
|
|
||||||
imm.hideSoftInputFromWindow(viewBinding.searchKeyword.getWindowToken(), 0);
|
|
||||||
|
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
|
||||||
loadInitial(Authorization.get(context), String.valueOf(viewBinding.searchKeyword.getText()), resultLimit);
|
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerViewExploreUsers.post(() -> {
|
|
||||||
if(usersList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (usersList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(Authorization.get(context), String.valueOf(viewBinding.searchKeyword.getText()), resultLimit, page);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
|
||||||
loadInitial(Authorization.get(context), "", resultLimit);
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
}, 200));
|
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerViewExploreUsers.post(() -> {
|
|
||||||
if(usersList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (usersList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(Authorization.get(context), "", resultLimit, page);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
|
||||||
viewBinding.recyclerViewExploreUsers.setHasFixedSize(true);
|
|
||||||
viewBinding.recyclerViewExploreUsers.addItemDecoration(dividerItemDecoration);
|
|
||||||
viewBinding.recyclerViewExploreUsers.setLayoutManager(new LinearLayoutManager(context));
|
|
||||||
viewBinding.recyclerViewExploreUsers.setAdapter(adapter);
|
|
||||||
|
|
||||||
loadInitial(Authorization.get(context), "", resultLimit);
|
|
||||||
|
|
||||||
return viewBinding.getRoot();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadInitial(String token, String searchKeyword, int resultLimit) {
|
|
||||||
|
|
||||||
Call<UserSearch> call = RetrofitClient
|
|
||||||
.getApiInterface(context).getUserBySearch(token, searchKeyword, resultLimit, 1);
|
|
||||||
call.enqueue(new Callback<UserSearch>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<UserSearch> call, @NonNull Response<UserSearch> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
if(response.body() != null && response.body().getData().size() > 0) {
|
|
||||||
usersList.clear();
|
|
||||||
usersList.addAll(response.body().getData());
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
usersList.clear();
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else if(response.code() == 404) {
|
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<UserSearch> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadMore(String token, String searchKeyword, int resultLimit, int page) {
|
|
||||||
|
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
|
||||||
Call<UserSearch> call = RetrofitClient.getApiInterface(context).getUserBySearch(token, searchKeyword, resultLimit, page);
|
|
||||||
call.enqueue(new Callback<UserSearch>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<UserSearch> call, @NonNull Response<UserSearch> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
assert response.body() != null;
|
|
||||||
List<UserInfo> result = response.body().getData();
|
|
||||||
if(result != null) {
|
|
||||||
if(result.size() > 0) {
|
|
||||||
pageSize = result.size();
|
|
||||||
usersList.addAll(result);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SnackBar.info(context, viewBinding.getRoot(), getString(R.string.noMoreData));
|
|
||||||
adapter.setMoreDataAvailable(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<UserSearch> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,7 +11,6 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
import androidx.activity.OnBackPressedCallback;
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
@ -122,24 +121,6 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
requireActivity().getOnBackPressedDispatcher().addCallback(getViewLifecycleOwner(), new OnBackPressedCallback(true) {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleOnBackPressed() {
|
|
||||||
if(path.size() == 0 || RepoDetailActivity.mViewPager.getCurrentItem() != 1) {
|
|
||||||
requireActivity().finish();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
path.remove(path.size() - 1);
|
|
||||||
binding.breadcrumbsView.removeLastItem();
|
|
||||||
if(path.size() == 0) {
|
|
||||||
fetchDataAsync(Authorization.get(getContext()), repoOwner, repoName, ref);
|
|
||||||
} else {
|
|
||||||
fetchDataAsyncSub(Authorization.get(getContext()), repoOwner, repoName, path.toString(), ref);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
((RepoDetailActivity) requireActivity()).setFragmentRefreshListenerFiles(repoBranch -> {
|
((RepoDetailActivity) requireActivity()).setFragmentRefreshListenerFiles(repoBranch -> {
|
||||||
|
|
||||||
path.clear();
|
path.clear();
|
||||||
|
@ -12,11 +12,15 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
import org.gitnex.tea4j.models.Issues;
|
import org.gitnex.tea4j.models.Issues;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.activities.RepoDetailActivity;
|
import org.mian.gitnex.activities.RepoDetailActivity;
|
||||||
@ -41,16 +45,18 @@ import retrofit2.Response;
|
|||||||
public class IssuesFragment extends Fragment {
|
public class IssuesFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentIssuesBinding fragmentIssuesBinding;
|
private FragmentIssuesBinding fragmentIssuesBinding;
|
||||||
private Context context;
|
|
||||||
|
|
||||||
private Menu menu;
|
private Menu menu;
|
||||||
|
private RecyclerView recyclerView;
|
||||||
private List<Issues> issuesList;
|
private List<Issues> issuesList;
|
||||||
private IssuesAdapter adapter;
|
private IssuesAdapter adapter;
|
||||||
|
private Context context;
|
||||||
private int pageSize = Constants.issuesPageInit;
|
private int pageSize = Constants.issuesPageInit;
|
||||||
|
private ProgressBar mProgressBar;
|
||||||
private final String TAG = Constants.tagIssuesList;
|
private final String TAG = Constants.tagIssuesList;
|
||||||
|
private TextView noDataIssues;
|
||||||
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
private final String requestType = Constants.issuesRequestType;
|
private final String requestType = Constants.issuesRequestType;
|
||||||
|
private ProgressBar progressLoadMore;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
@ -60,7 +66,7 @@ public class IssuesFragment extends Fragment {
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
|
||||||
TinyDB tinyDb = TinyDB.getInstance(context);
|
TinyDB tinyDb = TinyDB.getInstance(getContext());
|
||||||
String repoFullName = tinyDb.getString("repoFullName");
|
String repoFullName = tinyDb.getString("repoFullName");
|
||||||
String[] parts = repoFullName.split("/");
|
String[] parts = repoFullName.split("/");
|
||||||
final String repoOwner = parts[0];
|
final String repoOwner = parts[0];
|
||||||
@ -68,32 +74,39 @@ public class IssuesFragment extends Fragment {
|
|||||||
final String loginUid = tinyDb.getString("loginUid");
|
final String loginUid = tinyDb.getString("loginUid");
|
||||||
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
|
final String instanceToken = "token " + tinyDb.getString(loginUid + "-token");
|
||||||
|
|
||||||
|
final SwipeRefreshLayout swipeRefresh = fragmentIssuesBinding.pullToRefresh;
|
||||||
|
|
||||||
// if gitea is 1.12 or higher use the new limit
|
// if gitea is 1.12 or higher use the new limit
|
||||||
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
resultLimit = Constants.resultLimitNewGiteaInstances;
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recyclerView = fragmentIssuesBinding.recyclerView;
|
||||||
issuesList = new ArrayList<>();
|
issuesList = new ArrayList<>();
|
||||||
|
|
||||||
fragmentIssuesBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
progressLoadMore = fragmentIssuesBinding.progressLoadMore;
|
||||||
fragmentIssuesBinding.pullToRefresh.setRefreshing(false);
|
mProgressBar = fragmentIssuesBinding.progressBar;
|
||||||
loadInitial(instanceToken, repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"), "");
|
noDataIssues = fragmentIssuesBinding.noDataIssues;
|
||||||
|
|
||||||
|
swipeRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
|
swipeRefresh.setRefreshing(false);
|
||||||
|
loadInitial(instanceToken, repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"));
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
}, 200));
|
}, 200));
|
||||||
|
|
||||||
adapter = new IssuesAdapter(context, issuesList);
|
adapter = new IssuesAdapter(getContext(), issuesList);
|
||||||
adapter.setLoadMoreListener(() -> fragmentIssuesBinding.recyclerView.post(() -> {
|
adapter.setLoadMoreListener(() -> recyclerView.post(() -> {
|
||||||
if(issuesList.size() == resultLimit || pageSize == resultLimit) {
|
if(issuesList.size() == resultLimit || pageSize == resultLimit) {
|
||||||
int page = (issuesList.size() + resultLimit) / resultLimit;
|
int page = (issuesList.size() + resultLimit) / resultLimit;
|
||||||
loadMore(Authorization.get(context), repoOwner, repoName, page, resultLimit, requestType, tinyDb.getString("repoIssuesState"), "");
|
loadMore(Authorization.get(getContext()), repoOwner, repoName, page, resultLimit, requestType, tinyDb.getString("repoIssuesState"));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(fragmentIssuesBinding.recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
fragmentIssuesBinding.recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
fragmentIssuesBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
recyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
fragmentIssuesBinding.recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
||||||
fragmentIssuesBinding.recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
((RepoDetailActivity) requireActivity()).setFragmentRefreshListener(issueState -> {
|
((RepoDetailActivity) requireActivity()).setFragmentRefreshListener(issueState -> {
|
||||||
|
|
||||||
@ -106,47 +119,25 @@ public class IssuesFragment extends Fragment {
|
|||||||
|
|
||||||
issuesList.clear();
|
issuesList.clear();
|
||||||
|
|
||||||
adapter = new IssuesAdapter(context, issuesList);
|
adapter = new IssuesAdapter(getContext(), issuesList);
|
||||||
adapter.setLoadMoreListener(() -> fragmentIssuesBinding.recyclerView.post(() -> {
|
adapter.setLoadMoreListener(() -> recyclerView.post(() -> {
|
||||||
|
|
||||||
if(issuesList.size() == resultLimit || pageSize == resultLimit) {
|
if(issuesList.size() == resultLimit || pageSize == resultLimit) {
|
||||||
int page = (issuesList.size() + resultLimit) / resultLimit;
|
int page = (issuesList.size() + resultLimit) / resultLimit;
|
||||||
loadMore(Authorization.get(context), repoOwner, repoName, page, resultLimit, requestType, tinyDb.getString("repoIssuesState"), "");
|
loadMore(Authorization.get(getContext()), repoOwner, repoName, page, resultLimit, requestType, tinyDb.getString("repoIssuesState"));
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
tinyDb.putString("repoIssuesState", issueState);
|
tinyDb.putString("repoIssuesState", issueState);
|
||||||
|
|
||||||
fragmentIssuesBinding.progressBar.setVisibility(View.VISIBLE);
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
fragmentIssuesBinding.noDataIssues.setVisibility(View.GONE);
|
noDataIssues.setVisibility(View.GONE);
|
||||||
|
|
||||||
loadInitial(Authorization.get(context), repoOwner, repoName, resultLimit, requestType, issueState, "");
|
loadInitial(Authorization.get(getContext()), repoOwner, repoName, resultLimit, requestType, issueState);
|
||||||
fragmentIssuesBinding.recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
});
|
});
|
||||||
|
|
||||||
((RepoDetailActivity) requireActivity()).setFragmentRefreshListenerFilterIssuesByMilestone(filterIssueByMilestone -> {
|
loadInitial(Authorization.get(getContext()), repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"));
|
||||||
|
|
||||||
issuesList.clear();
|
|
||||||
|
|
||||||
adapter = new IssuesAdapter(context, issuesList);
|
|
||||||
adapter.setLoadMoreListener(() -> fragmentIssuesBinding.recyclerView.post(() -> {
|
|
||||||
|
|
||||||
if(issuesList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (issuesList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(Authorization.get(context), repoOwner, repoName, page, resultLimit, requestType, tinyDb.getString("repoIssuesState"), tinyDb.getString("issueMilestoneFilterId"));
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
tinyDb.putString("issueMilestoneFilterId", filterIssueByMilestone);
|
|
||||||
|
|
||||||
fragmentIssuesBinding.progressBar.setVisibility(View.VISIBLE);
|
|
||||||
fragmentIssuesBinding.noDataIssues.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
loadInitial(Authorization.get(context), repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"), filterIssueByMilestone);
|
|
||||||
fragmentIssuesBinding.recyclerView.setAdapter(adapter);
|
|
||||||
});
|
|
||||||
|
|
||||||
loadInitial(Authorization.get(context), repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"), tinyDb.getString("issueMilestoneFilterId"));
|
|
||||||
|
|
||||||
return fragmentIssuesBinding.getRoot();
|
return fragmentIssuesBinding.getRoot();
|
||||||
}
|
}
|
||||||
@ -155,7 +146,7 @@ public class IssuesFragment extends Fragment {
|
|||||||
public void onResume() {
|
public void onResume() {
|
||||||
|
|
||||||
super.onResume();
|
super.onResume();
|
||||||
TinyDB tinyDb = TinyDB.getInstance(context);
|
TinyDB tinyDb = TinyDB.getInstance(getContext());
|
||||||
|
|
||||||
String repoFullName = tinyDb.getString("repoFullName");
|
String repoFullName = tinyDb.getString("repoFullName");
|
||||||
String[] parts = repoFullName.split("/");
|
String[] parts = repoFullName.split("/");
|
||||||
@ -163,14 +154,14 @@ public class IssuesFragment extends Fragment {
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
if(tinyDb.getBoolean("resumeIssues")) {
|
if(tinyDb.getBoolean("resumeIssues")) {
|
||||||
loadInitial(Authorization.get(context), repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"), tinyDb.getString("issueMilestoneFilterId"));
|
loadInitial(Authorization.get(getContext()), repoOwner, repoName, resultLimit, requestType, tinyDb.getString("repoIssuesState"));
|
||||||
tinyDb.putBoolean("resumeIssues", false);
|
tinyDb.putBoolean("resumeIssues", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadInitial(String token, String repoOwner, String repoName, int resultLimit, String requestType, String issueState, String filterByMilestone) {
|
private void loadInitial(String token, String repoOwner, String repoName, int resultLimit, String requestType, String issueState) {
|
||||||
|
|
||||||
Call<List<Issues>> call = RetrofitClient.getApiInterface(context).getIssues(token, repoOwner, repoName, 1, resultLimit, requestType, issueState, filterByMilestone);
|
Call<List<Issues>> call = RetrofitClient.getApiInterface(context).getIssues(token, repoOwner, repoName, 1, resultLimit, requestType, issueState);
|
||||||
|
|
||||||
call.enqueue(new Callback<List<Issues>>() {
|
call.enqueue(new Callback<List<Issues>>() {
|
||||||
@Override
|
@Override
|
||||||
@ -182,18 +173,18 @@ public class IssuesFragment extends Fragment {
|
|||||||
issuesList.clear();
|
issuesList.clear();
|
||||||
issuesList.addAll(response.body());
|
issuesList.addAll(response.body());
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentIssuesBinding.noDataIssues.setVisibility(View.GONE);
|
noDataIssues.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
issuesList.clear();
|
issuesList.clear();
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentIssuesBinding.noDataIssues.setVisibility(View.VISIBLE);
|
noDataIssues.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
fragmentIssuesBinding.progressBar.setVisibility(View.GONE);
|
mProgressBar.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else if(response.code() == 404) {
|
else if(response.code() == 404) {
|
||||||
fragmentIssuesBinding.noDataIssues.setVisibility(View.VISIBLE);
|
noDataIssues.setVisibility(View.VISIBLE);
|
||||||
fragmentIssuesBinding.progressBar.setVisibility(View.GONE);
|
mProgressBar.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
Log.e(TAG, String.valueOf(response.code()));
|
||||||
@ -207,11 +198,11 @@ public class IssuesFragment extends Fragment {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadMore(String token, String repoOwner, String repoName, int page, int resultLimit, String requestType, String issueState, String filterByMilestone) {
|
private void loadMore(String token, String repoOwner, String repoName, int page, int resultLimit, String requestType, String issueState) {
|
||||||
|
|
||||||
fragmentIssuesBinding.progressBar.setVisibility(View.VISIBLE);
|
progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<Issues>> call = RetrofitClient.getApiInterface(context).getIssues(token, repoOwner, repoName, page, resultLimit, requestType, issueState, filterByMilestone);
|
Call<List<Issues>> call = RetrofitClient.getApiInterface(context).getIssues(token, repoOwner, repoName, page, resultLimit, requestType, issueState);
|
||||||
|
|
||||||
call.enqueue(new Callback<List<Issues>>() {
|
call.enqueue(new Callback<List<Issues>>() {
|
||||||
|
|
||||||
@ -229,7 +220,7 @@ public class IssuesFragment extends Fragment {
|
|||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentIssuesBinding.progressBar.setVisibility(View.GONE);
|
progressLoadMore.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
Log.e(TAG, String.valueOf(response.code()));
|
||||||
@ -287,7 +278,7 @@ public class IssuesFragment extends Fragment {
|
|||||||
if(d == null || d.getTitle() == null || d.getBody() == null) {
|
if(d == null || d.getTitle() == null || d.getBody() == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(d.getTitle().toLowerCase().contains(text) || d.getBody().toLowerCase().contains(text) || String.valueOf(d.getNumber()).startsWith(text)) {
|
if(d.getTitle().toLowerCase().contains(text) || d.getBody().toLowerCase().contains(text)) {
|
||||||
arr.add(d);
|
arr.add(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,25 @@
|
|||||||
package org.mian.gitnex.fragments;
|
package org.mian.gitnex.fragments;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import org.gitnex.tea4j.models.UserInfo;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.mian.gitnex.R;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
import org.mian.gitnex.adapters.MyProfileFollowersAdapter;
|
import org.mian.gitnex.adapters.MyProfileFollowersAdapter;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
|
||||||
import org.mian.gitnex.databinding.FragmentProfileFollowersFollowingBinding;
|
import org.mian.gitnex.databinding.FragmentProfileFollowersFollowingBinding;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.viewmodels.ProfileFollowersViewModel;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Callback;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
@ -32,119 +27,106 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
public class MyProfileFollowersFragment extends Fragment {
|
public class MyProfileFollowersFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentProfileFollowersFollowingBinding viewBinding;
|
private ProgressBar mProgressBar;
|
||||||
private Context context;
|
|
||||||
|
|
||||||
private List<UserInfo> dataList;
|
|
||||||
private MyProfileFollowersAdapter adapter;
|
private MyProfileFollowersAdapter adapter;
|
||||||
private int pageSize;
|
private RecyclerView mRecyclerView;
|
||||||
private final String TAG = Constants.tagFollowers;
|
private TextView noDataFollowers;
|
||||||
private int resultLimit;
|
private static String repoNameF = "param2";
|
||||||
|
private static String repoOwnerF = "param1";
|
||||||
|
|
||||||
|
private String repoName;
|
||||||
|
private String repoOwner;
|
||||||
|
|
||||||
|
private OnFragmentInteractionListener mListener;
|
||||||
|
|
||||||
|
public MyProfileFollowersFragment() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MyProfileFollowersFragment newInstance(String param1, String param2) {
|
||||||
|
MyProfileFollowersFragment fragment = new MyProfileFollowersFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(repoOwnerF, param1);
|
||||||
|
args.putString(repoNameF, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
repoName = getArguments().getString(repoNameF);
|
||||||
|
repoOwner = getArguments().getString(repoOwnerF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||||
Bundle savedInstanceState) {
|
Bundle savedInstanceState) {
|
||||||
|
|
||||||
viewBinding = FragmentProfileFollowersFollowingBinding.inflate(inflater, container, false);
|
FragmentProfileFollowersFollowingBinding fragmentProfileFollowersFollowingBinding = FragmentProfileFollowersFollowingBinding.inflate(inflater, container, false);
|
||||||
context = getContext();
|
|
||||||
|
|
||||||
dataList = new ArrayList<>();
|
final SwipeRefreshLayout swipeRefresh = fragmentProfileFollowersFollowingBinding.pullToRefresh;
|
||||||
adapter = new MyProfileFollowersAdapter(dataList, context);
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
noDataFollowers = fragmentProfileFollowersFollowingBinding.noData;
|
||||||
|
mRecyclerView = fragmentProfileFollowersFollowingBinding.recyclerView;
|
||||||
|
|
||||||
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
|
|
||||||
|
mRecyclerView.setHasFixedSize(true);
|
||||||
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
|
|
||||||
|
mProgressBar = fragmentProfileFollowersFollowingBinding.progressBar;
|
||||||
|
|
||||||
|
swipeRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
|
|
||||||
|
swipeRefresh.setRefreshing(false);
|
||||||
|
ProfileFollowersViewModel.loadFollowersList(Authorization.get(getContext()), getContext());
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
|
||||||
loadInitial(resultLimit);
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
}, 200));
|
}, 200));
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerView.post(() -> {
|
fetchDataAsync(Authorization.get(getContext()));
|
||||||
if(dataList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (dataList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(resultLimit, page);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
return fragmentProfileFollowersFollowingBinding.getRoot();
|
||||||
viewBinding.recyclerView.setHasFixedSize(true);
|
|
||||||
viewBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
|
||||||
viewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
|
||||||
viewBinding.recyclerView.setAdapter(adapter);
|
|
||||||
|
|
||||||
loadInitial(resultLimit);
|
|
||||||
|
|
||||||
return viewBinding.getRoot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadInitial(int resultLimit) {
|
private void fetchDataAsync(String instanceToken) {
|
||||||
|
|
||||||
Call<List<UserInfo>> call = RetrofitClient
|
ProfileFollowersViewModel pfModel = new ViewModelProvider(this).get(ProfileFollowersViewModel.class);
|
||||||
.getApiInterface(context)
|
|
||||||
.getFollowers(Authorization.get(getContext()), 1, resultLimit);
|
pfModel.getFollowersList(instanceToken, getContext()).observe(getViewLifecycleOwner(), pfListMain -> {
|
||||||
call.enqueue(new Callback<List<UserInfo>>() {
|
|
||||||
@Override
|
adapter = new MyProfileFollowersAdapter(getContext(), pfListMain);
|
||||||
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
|
|
||||||
if(response.isSuccessful()) {
|
if(adapter.getItemCount() > 0) {
|
||||||
if(response.body() != null && response.body().size() > 0) {
|
mRecyclerView.setAdapter(adapter);
|
||||||
dataList.clear();
|
noDataFollowers.setVisibility(View.GONE);
|
||||||
dataList.addAll(response.body());
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dataList.clear();
|
adapter.notifyDataSetChanged();
|
||||||
adapter.notifyDataChanged();
|
mRecyclerView.setAdapter(adapter);
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
noDataFollowers.setVisibility(View.VISIBLE);
|
||||||
}
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else if(response.code() == 404) {
|
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
mProgressBar.setVisibility(View.GONE);
|
||||||
public void onFailure(@NonNull Call<List<UserInfo>> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadMore(int resultLimit, int page) {
|
public void onButtonPressed(Uri uri) {
|
||||||
|
if (mListener != null) {
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
mListener.onFragmentInteraction(uri);
|
||||||
Call<List<UserInfo>> call = RetrofitClient.getApiInterface(context)
|
|
||||||
.getFollowers(Authorization.get(getContext()), page, resultLimit);
|
|
||||||
call.enqueue(new Callback<List<UserInfo>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
assert response.body() != null;
|
|
||||||
List<UserInfo> result = response.body();
|
|
||||||
if(result.size() > 0) {
|
|
||||||
pageSize = result.size();
|
|
||||||
dataList.addAll(result);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SnackBar.info(context, viewBinding.getRoot(), getString(R.string.noMoreData));
|
|
||||||
adapter.setMoreDataAvailable(false);
|
|
||||||
}
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<List<UserInfo>> call, @NonNull Throwable t) {
|
public void onDetach() {
|
||||||
Log.e(TAG, t.toString());
|
super.onDetach();
|
||||||
|
mListener = null;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
public interface OnFragmentInteractionListener {
|
||||||
|
void onFragmentInteraction(Uri uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,30 +1,26 @@
|
|||||||
package org.mian.gitnex.fragments;
|
package org.mian.gitnex.fragments;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import org.gitnex.tea4j.models.UserInfo;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import org.mian.gitnex.R;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
import org.mian.gitnex.adapters.MyProfileFollowingAdapter;
|
import org.mian.gitnex.adapters.MyProfileFollowingAdapter;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
|
||||||
import org.mian.gitnex.databinding.FragmentProfileFollowersFollowingBinding;
|
import org.mian.gitnex.databinding.FragmentProfileFollowersFollowingBinding;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.viewmodels.ProfileFollowingViewModel;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
import retrofit2.Call;
|
|
||||||
import retrofit2.Callback;
|
|
||||||
import retrofit2.Response;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Author M M Arif
|
* Author M M Arif
|
||||||
@ -32,118 +28,108 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
public class MyProfileFollowingFragment extends Fragment {
|
public class MyProfileFollowingFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentProfileFollowersFollowingBinding viewBinding;
|
private ProgressBar mProgressBar;
|
||||||
private Context context;
|
|
||||||
|
|
||||||
private List<UserInfo> dataList;
|
|
||||||
private MyProfileFollowingAdapter adapter;
|
private MyProfileFollowingAdapter adapter;
|
||||||
private int pageSize;
|
private RecyclerView mRecyclerView;
|
||||||
private final String TAG = Constants.tagFollowing;
|
private TextView noDataFollowing;
|
||||||
private int resultLimit;
|
private static final String repoNameF = "param2";
|
||||||
|
private static final String repoOwnerF = "param1";
|
||||||
|
|
||||||
|
private String repoName;
|
||||||
|
private String repoOwner;
|
||||||
|
|
||||||
|
private OnFragmentInteractionListener mListener;
|
||||||
|
|
||||||
|
public MyProfileFollowingFragment() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MyProfileFollowingFragment newInstance(String param1, String param2) {
|
||||||
|
MyProfileFollowingFragment fragment = new MyProfileFollowingFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(repoOwnerF, param1);
|
||||||
|
args.putString(repoNameF, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
repoName = getArguments().getString(repoNameF);
|
||||||
|
repoOwner = getArguments().getString(repoOwnerF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
viewBinding = FragmentProfileFollowersFollowingBinding.inflate(inflater, container, false);
|
@Override
|
||||||
context = getContext();
|
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
|
||||||
dataList = new ArrayList<>();
|
FragmentProfileFollowersFollowingBinding fragmentProfileFollowersFollowingBinding = FragmentProfileFollowersFollowingBinding.inflate(inflater, container, false);
|
||||||
adapter = new MyProfileFollowingAdapter(dataList, context);
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
TinyDB tinyDb = TinyDB.getInstance(getContext());
|
||||||
|
|
||||||
|
final SwipeRefreshLayout swipeRefresh = fragmentProfileFollowersFollowingBinding.pullToRefresh;
|
||||||
|
|
||||||
|
noDataFollowing = fragmentProfileFollowersFollowingBinding.noData;
|
||||||
|
mRecyclerView = fragmentProfileFollowersFollowingBinding.recyclerView;
|
||||||
|
|
||||||
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(mRecyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
|
|
||||||
|
mRecyclerView.setHasFixedSize(true);
|
||||||
|
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
|
||||||
|
mRecyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
|
|
||||||
|
mProgressBar = fragmentProfileFollowersFollowingBinding.progressBar;
|
||||||
|
|
||||||
|
swipeRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
|
|
||||||
|
swipeRefresh.setRefreshing(false);
|
||||||
|
ProfileFollowingViewModel.loadFollowingList(Authorization.get(getContext()), getContext());
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
|
||||||
loadInitial(resultLimit);
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
}, 200));
|
}, 200));
|
||||||
|
|
||||||
adapter.setLoadMoreListener(() -> viewBinding.recyclerView.post(() -> {
|
fetchDataAsync(Authorization.get(getContext()));
|
||||||
if(dataList.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (dataList.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(resultLimit, page);
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(context, DividerItemDecoration.VERTICAL);
|
return fragmentProfileFollowersFollowingBinding.getRoot();
|
||||||
viewBinding.recyclerView.setHasFixedSize(true);
|
|
||||||
viewBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
|
||||||
viewBinding.recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
|
||||||
viewBinding.recyclerView.setAdapter(adapter);
|
|
||||||
|
|
||||||
loadInitial(resultLimit);
|
|
||||||
|
|
||||||
return viewBinding.getRoot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadInitial(int resultLimit) {
|
private void fetchDataAsync(String instanceToken) {
|
||||||
|
|
||||||
Call<List<UserInfo>> call = RetrofitClient
|
ProfileFollowingViewModel pfModel = new ViewModelProvider(this).get(ProfileFollowingViewModel.class);
|
||||||
.getApiInterface(context)
|
|
||||||
.getFollowing(Authorization.get(getContext()), 1, resultLimit);
|
pfModel.getFollowingList(instanceToken, getContext()).observe(getViewLifecycleOwner(), pfListMain -> {
|
||||||
call.enqueue(new Callback<List<UserInfo>>() {
|
|
||||||
@Override
|
adapter = new MyProfileFollowingAdapter(getContext(), pfListMain);
|
||||||
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
|
|
||||||
if(response.isSuccessful()) {
|
if(adapter.getItemCount() > 0) {
|
||||||
if(response.body() != null && response.body().size() > 0) {
|
mRecyclerView.setAdapter(adapter);
|
||||||
dataList.clear();
|
noDataFollowing.setVisibility(View.GONE);
|
||||||
dataList.addAll(response.body());
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.noData.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
dataList.clear();
|
adapter.notifyDataSetChanged();
|
||||||
adapter.notifyDataChanged();
|
mRecyclerView.setAdapter(adapter);
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
noDataFollowing.setVisibility(View.VISIBLE);
|
||||||
}
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else if(response.code() == 404) {
|
|
||||||
viewBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
mProgressBar.setVisibility(View.GONE);
|
||||||
public void onFailure(@NonNull Call<List<UserInfo>> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadMore(int resultLimit, int page) {
|
public void onButtonPressed(Uri uri) {
|
||||||
|
if (mListener != null) {
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
mListener.onFragmentInteraction(uri);
|
||||||
Call<List<UserInfo>> call = RetrofitClient.getApiInterface(context)
|
|
||||||
.getFollowing(Authorization.get(getContext()), page, resultLimit);
|
|
||||||
call.enqueue(new Callback<List<UserInfo>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
|
|
||||||
if(response.isSuccessful()) {
|
|
||||||
assert response.body() != null;
|
|
||||||
List<UserInfo> result = response.body();
|
|
||||||
if(result.size() > 0) {
|
|
||||||
pageSize = result.size();
|
|
||||||
dataList.addAll(result);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
SnackBar.info(context, viewBinding.getRoot(), getString(R.string.noMoreData));
|
|
||||||
adapter.setMoreDataAvailable(false);
|
|
||||||
}
|
|
||||||
adapter.notifyDataChanged();
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<List<UserInfo>> call, @NonNull Throwable t) {
|
public void onDetach() {
|
||||||
Log.e(TAG, t.toString());
|
super.onDetach();
|
||||||
|
mListener = null;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
public interface OnFragmentInteractionListener {
|
||||||
|
void onFragmentInteraction(Uri uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -170,10 +170,10 @@ public class MyProfileFragment extends Fragment {
|
|||||||
switch (position) {
|
switch (position) {
|
||||||
|
|
||||||
case 0: // followers
|
case 0: // followers
|
||||||
return new MyProfileFollowersFragment();
|
return MyProfileFollowersFragment.newInstance("repoOwner", "repoName");
|
||||||
|
|
||||||
case 1: // following
|
case 1: // following
|
||||||
return new MyProfileFollowingFragment();
|
return MyProfileFollowingFragment.newInstance("repoOwner", "repoName");
|
||||||
|
|
||||||
case 2: // emails
|
case 2: // emails
|
||||||
return MyProfileEmailsFragment.newInstance("repoOwner", "repoName");
|
return MyProfileEmailsFragment.newInstance("repoOwner", "repoName");
|
||||||
@ -215,4 +215,5 @@ public class MyProfileFragment extends Fragment {
|
|||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,6 @@ import android.app.Activity;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
|
||||||
import android.os.Looper;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
@ -13,12 +11,16 @@ import android.view.MenuInflater;
|
|||||||
import android.view.MenuItem;
|
import android.view.MenuItem;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.gitnex.tea4j.models.NotificationThread;
|
import org.gitnex.tea4j.models.NotificationThread;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
@ -29,7 +31,7 @@ import org.mian.gitnex.clients.RetrofitClient;
|
|||||||
import org.mian.gitnex.databinding.FragmentNotificationsBinding;
|
import org.mian.gitnex.databinding.FragmentNotificationsBinding;
|
||||||
import org.mian.gitnex.helpers.AppUtil;
|
import org.mian.gitnex.helpers.AppUtil;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.InfiniteScrollListener;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -42,26 +44,28 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Author opyale
|
* Author opyale
|
||||||
* Modified M M Arif
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public class NotificationsFragment extends Fragment implements NotificationsAdapter.OnNotificationClickedListener, NotificationsAdapter.OnMoreClickedListener, BottomSheetNotificationsFragment.OnOptionSelectedListener {
|
public class NotificationsFragment extends Fragment implements NotificationsAdapter.OnNotificationClickedListener, NotificationsAdapter.OnMoreClickedListener, BottomSheetNotificationsFragment.OnOptionSelectedListener {
|
||||||
|
|
||||||
private FragmentNotificationsBinding viewBinding;
|
|
||||||
private List<NotificationThread> notificationThreads;
|
private List<NotificationThread> notificationThreads;
|
||||||
private NotificationsAdapter notificationsAdapter;
|
private NotificationsAdapter notificationsAdapter;
|
||||||
private NotificationsActions notificationsActions;
|
private NotificationsActions notificationsActions;
|
||||||
|
|
||||||
|
private ExtendedFloatingActionButton markAllAsRead;
|
||||||
|
private ProgressBar progressBar;
|
||||||
|
private ProgressBar loadingMoreView;
|
||||||
|
private TextView noDataNotifications;
|
||||||
|
private SwipeRefreshLayout pullToRefresh;
|
||||||
|
|
||||||
private Activity activity;
|
private Activity activity;
|
||||||
private Context context;
|
private Context context;
|
||||||
private TinyDB tinyDB;
|
private TinyDB tinyDB;
|
||||||
private Menu menu;
|
private Menu menu;
|
||||||
|
|
||||||
private int resultLimit;
|
private int pageCurrentIndex = 1;
|
||||||
private int pageSize;
|
private int pageResultLimit;
|
||||||
private String currentFilterMode = "unread";
|
private String currentFilterMode = "unread";
|
||||||
private final String TAG = Constants.tagNotifications;
|
|
||||||
private String instanceToken;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
@ -73,200 +77,189 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
|
|||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
viewBinding = FragmentNotificationsBinding.inflate(inflater, container, false);
|
FragmentNotificationsBinding fragmentNotificationsBinding = FragmentNotificationsBinding.inflate(inflater, container, false);
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
|
|
||||||
activity = requireActivity();
|
activity = requireActivity();
|
||||||
context = getContext();
|
context = getContext();
|
||||||
tinyDB = TinyDB.getInstance(context);
|
tinyDB = TinyDB.getInstance(context);
|
||||||
|
|
||||||
String loginUid = tinyDB.getString("loginUid");
|
pageResultLimit = Constants.getCurrentResultLimit(context);
|
||||||
instanceToken = "token " + tinyDB.getString(loginUid + "-token");
|
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
|
||||||
tinyDB.putString("notificationsFilterState", currentFilterMode);
|
tinyDB.putString("notificationsFilterState", currentFilterMode);
|
||||||
|
|
||||||
|
markAllAsRead = fragmentNotificationsBinding.markAllAsRead;
|
||||||
|
noDataNotifications = fragmentNotificationsBinding.noDataNotifications;
|
||||||
|
loadingMoreView = fragmentNotificationsBinding.loadingMoreView;
|
||||||
|
progressBar = fragmentNotificationsBinding.progressBar;
|
||||||
|
|
||||||
notificationThreads = new ArrayList<>();
|
notificationThreads = new ArrayList<>();
|
||||||
notificationsActions = new NotificationsActions(context);
|
notificationsActions = new NotificationsActions(context);
|
||||||
notificationsAdapter = new NotificationsAdapter(context, notificationThreads, this, this);
|
notificationsAdapter = new NotificationsAdapter(context, notificationThreads, this, this);
|
||||||
|
|
||||||
|
RecyclerView recyclerView = fragmentNotificationsBinding.notifications;
|
||||||
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
|
LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(viewBinding.notifications.getContext(), DividerItemDecoration.VERTICAL);
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
|
|
||||||
viewBinding.notifications.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
viewBinding.notifications.setLayoutManager(linearLayoutManager);
|
recyclerView.setLayoutManager(linearLayoutManager);
|
||||||
viewBinding.notifications.setAdapter(notificationsAdapter);
|
recyclerView.setAdapter(notificationsAdapter);
|
||||||
viewBinding.notifications.addItemDecoration(dividerItemDecoration);
|
recyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
|
recyclerView.addOnScrollListener(new InfiniteScrollListener(pageResultLimit, linearLayoutManager) {
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
@Override
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
public void onScrolledToEnd(int firstVisibleItemPosition) {
|
||||||
loadInitial(resultLimit);
|
|
||||||
notificationsAdapter.notifyDataChanged();
|
pageCurrentIndex++;
|
||||||
}, 200));
|
loadNotifications(true);
|
||||||
|
|
||||||
notificationsAdapter.setLoadMoreListener(() -> viewBinding.notifications.post(() -> {
|
|
||||||
if(notificationThreads.size() == resultLimit || pageSize == resultLimit) {
|
|
||||||
int page = (notificationThreads.size() + resultLimit) / resultLimit;
|
|
||||||
loadMore(resultLimit, page);
|
|
||||||
}
|
}
|
||||||
}));
|
});
|
||||||
|
|
||||||
viewBinding.notifications.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
|
|
||||||
if(currentFilterMode.equalsIgnoreCase("unread")) {
|
if(currentFilterMode.equalsIgnoreCase("unread")) {
|
||||||
if(dy > 0 && viewBinding.markAllAsRead.isShown()) {
|
|
||||||
viewBinding.markAllAsRead.setVisibility(View.GONE);
|
if(dy > 0 && markAllAsRead.isShown()) {
|
||||||
}
|
|
||||||
else if(dy < 0) {
|
markAllAsRead.setVisibility(View.GONE);
|
||||||
viewBinding.markAllAsRead.setVisibility(View.VISIBLE);
|
} else if(dy < 0) {
|
||||||
|
|
||||||
|
markAllAsRead.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) {
|
||||||
|
|
||||||
super.onScrollStateChanged(recyclerView, newState);
|
super.onScrollStateChanged(recyclerView, newState);
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
viewBinding.markAllAsRead.setOnClickListener(v1 -> {
|
markAllAsRead.setOnClickListener(v1 -> {
|
||||||
|
|
||||||
Thread thread = new Thread(() -> {
|
Thread thread = new Thread(() -> {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if(notificationsActions.setAllNotificationsRead(new Date())) {
|
if(notificationsActions.setAllNotificationsRead(new Date())) {
|
||||||
|
|
||||||
activity.runOnUiThread(() -> {
|
activity.runOnUiThread(() -> {
|
||||||
|
|
||||||
Toasty.success(context, getString(R.string.markedNotificationsAsRead));
|
Toasty.success(context, getString(R.string.markedNotificationsAsRead));
|
||||||
loadInitial(resultLimit);
|
loadNotifications(true);
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(IOException e) {
|
catch(IOException e) {
|
||||||
|
|
||||||
activity.runOnUiThread(() -> Toasty.error(context, getString(R.string.genericError)));
|
activity.runOnUiThread(() -> Toasty.error(context, getString(R.string.genericError)));
|
||||||
Log.e("onError", e.toString());
|
Log.e("onError", e.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
thread.start();
|
thread.start();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
viewBinding.pullToRefresh.setOnRefreshListener(() -> {
|
pullToRefresh = fragmentNotificationsBinding.pullToRefresh;
|
||||||
loadInitial(resultLimit);
|
pullToRefresh.setOnRefreshListener(() -> {
|
||||||
|
|
||||||
|
pageCurrentIndex = 1;
|
||||||
|
loadNotifications(false);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
loadInitial(resultLimit);
|
loadNotifications(false);
|
||||||
return viewBinding.getRoot();
|
return fragmentNotificationsBinding.getRoot();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadInitial(int resultLimit) {
|
private void loadNotifications(boolean append) {
|
||||||
|
|
||||||
|
noDataNotifications.setVisibility(View.GONE);
|
||||||
|
|
||||||
|
if(pageCurrentIndex == 1 || !append) {
|
||||||
|
|
||||||
notificationThreads.clear();
|
notificationThreads.clear();
|
||||||
notificationsAdapter.notifyDataChanged();
|
notificationsAdapter.notifyDataSetChanged();
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
pullToRefresh.setRefreshing(false);
|
||||||
notificationThreads.clear();
|
progressBar.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
loadingMoreView.setVisibility(View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
String loginUid = tinyDB.getString("loginUid");
|
||||||
|
String instanceToken = "token " + tinyDB.getString(loginUid + "-token");
|
||||||
|
|
||||||
String[] filter = tinyDB.getString("notificationsFilterState").equals("read") ?
|
String[] filter = tinyDB.getString("notificationsFilterState").equals("read") ?
|
||||||
new String[]{"pinned", "read"} :
|
new String[]{"pinned", "read"} :
|
||||||
new String[]{"pinned", "unread"};
|
new String[]{"pinned", "unread"};
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
|
||||||
|
|
||||||
Call<List<NotificationThread>> call = RetrofitClient
|
Call<List<NotificationThread>> call = RetrofitClient
|
||||||
.getApiInterface(context)
|
.getApiInterface(context)
|
||||||
.getNotificationThreads(instanceToken, false, filter,
|
.getNotificationThreads(instanceToken, false, filter,
|
||||||
Constants.defaultOldestTimestamp, "",
|
Constants.defaultOldestTimestamp, "",
|
||||||
1, resultLimit);
|
pageCurrentIndex, pageResultLimit);
|
||||||
|
|
||||||
call.enqueue(new Callback<List<NotificationThread>>() {
|
call.enqueue(new Callback<List<NotificationThread>>() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(@NonNull Call<List<NotificationThread>> call, @NonNull Response<List<NotificationThread>> response) {
|
public void onResponse(@NonNull Call<List<NotificationThread>> call, @NonNull Response<List<NotificationThread>> response) {
|
||||||
if(response.isSuccessful()) {
|
|
||||||
if(response.body() != null && response.body().size() > 0) {
|
|
||||||
notificationThreads.addAll(response.body());
|
|
||||||
notificationsAdapter.notifyDataChanged();
|
|
||||||
viewBinding.noDataNotifications.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
notificationsAdapter.notifyDataChanged();
|
|
||||||
viewBinding.noDataNotifications.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else if(response.code() == 404) {
|
|
||||||
viewBinding.noDataNotifications.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
notificationsAdapter.notifyDataChanged();
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
|
||||||
onCleanup();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onFailure(@NonNull Call<List<NotificationThread>> call, @NonNull Throwable t) {
|
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
onCleanup();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadMore(int resultLimit, int page) {
|
|
||||||
|
|
||||||
String[] filter = tinyDB.getString("notificationsFilterState").equals("read") ?
|
|
||||||
new String[]{"pinned", "read"} :
|
|
||||||
new String[]{"pinned", "unread"};
|
|
||||||
|
|
||||||
viewBinding.progressBar.setVisibility(View.VISIBLE);
|
|
||||||
Call<List<NotificationThread>> call = RetrofitClient.getApiInterface(context)
|
|
||||||
.getNotificationThreads(instanceToken, false, filter,
|
|
||||||
Constants.defaultOldestTimestamp, "",
|
|
||||||
page, resultLimit);
|
|
||||||
call.enqueue(new Callback<List<NotificationThread>>() {
|
|
||||||
@Override
|
|
||||||
public void onResponse(@NonNull Call<List<NotificationThread>> call, @NonNull Response<List<NotificationThread>> response) {
|
|
||||||
if(response.code() == 200) {
|
if(response.code() == 200) {
|
||||||
assert response.body() != null;
|
|
||||||
List<NotificationThread> result = response.body();
|
|
||||||
|
|
||||||
if(result.size() > 0) {
|
assert response.body() != null;
|
||||||
pageSize = result.size();
|
|
||||||
notificationThreads.addAll(result);
|
if(!append) {
|
||||||
|
|
||||||
|
notificationThreads.clear();
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
SnackBar.info(context, viewBinding.getRoot(), getString(R.string.noMoreData));
|
notificationThreads.addAll(response.body());
|
||||||
notificationsAdapter.setMoreDataAvailable(false);
|
notificationsAdapter.notifyDataSetChanged();
|
||||||
}
|
|
||||||
notificationsAdapter.notifyDataChanged();
|
} else {
|
||||||
viewBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
Log.e("onError", String.valueOf(response.code()));
|
||||||
else {
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onCleanup();
|
onCleanup();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<List<NotificationThread>> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<List<NotificationThread>> call, @NonNull Throwable t) {
|
||||||
Log.e(TAG, t.toString());
|
|
||||||
|
Log.e("onError", t.toString());
|
||||||
onCleanup();
|
onCleanup();
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void onCleanup() {
|
private void onCleanup() {
|
||||||
|
|
||||||
AppUtil.setMultiVisibility(View.GONE, viewBinding.progressBar, viewBinding.progressBar);
|
AppUtil.setMultiVisibility(View.GONE, loadingMoreView, progressBar);
|
||||||
viewBinding.pullToRefresh.setRefreshing(false);
|
pullToRefresh.setRefreshing(false);
|
||||||
|
|
||||||
if(currentFilterMode.equalsIgnoreCase("unread")) {
|
|
||||||
|
|
||||||
if(notificationThreads.isEmpty()) {
|
if(notificationThreads.isEmpty()) {
|
||||||
viewBinding.noDataNotifications.setVisibility(View.VISIBLE);
|
|
||||||
viewBinding.markAllAsRead.setVisibility(View.GONE);
|
noDataNotifications.setVisibility(View.VISIBLE);
|
||||||
|
markAllAsRead.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
viewBinding.markAllAsRead.setVisibility(View.VISIBLE);
|
markAllAsRead.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private void changeFilterMode() {
|
private void changeFilterMode() {
|
||||||
@ -278,10 +271,11 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
|
|||||||
menu.getItem(0).setIcon(filterIcon);
|
menu.getItem(0).setIcon(filterIcon);
|
||||||
|
|
||||||
if(currentFilterMode.equalsIgnoreCase("read")) {
|
if(currentFilterMode.equalsIgnoreCase("read")) {
|
||||||
viewBinding.markAllAsRead.setVisibility(View.GONE);
|
|
||||||
}
|
markAllAsRead.setVisibility(View.GONE);
|
||||||
else {
|
} else {
|
||||||
viewBinding.markAllAsRead.setVisibility(View.VISIBLE);
|
|
||||||
|
markAllAsRead.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,11 +283,14 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
|
|||||||
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
|
public void onCreateOptionsMenu(@NonNull Menu menu, @NonNull MenuInflater inflater) {
|
||||||
|
|
||||||
this.menu = menu;
|
this.menu = menu;
|
||||||
|
|
||||||
inflater.inflate(R.menu.filter_menu_notifications, menu);
|
inflater.inflate(R.menu.filter_menu_notifications, menu);
|
||||||
|
|
||||||
currentFilterMode = tinyDB.getString("notificationsFilterState");
|
currentFilterMode = tinyDB.getString("notificationsFilterState");
|
||||||
changeFilterMode();
|
changeFilterMode();
|
||||||
|
|
||||||
super.onCreateOptionsMenu(menu, inflater);
|
super.onCreateOptionsMenu(menu, inflater);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -305,25 +302,37 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
|
|||||||
bottomSheetNotificationsFilterFragment.show(getChildFragmentManager(), "notificationsFilterBottomSheet");
|
bottomSheetNotificationsFilterFragment.show(getChildFragmentManager(), "notificationsFilterBottomSheet");
|
||||||
bottomSheetNotificationsFilterFragment.setOnDismissedListener(() -> {
|
bottomSheetNotificationsFilterFragment.setOnDismissedListener(() -> {
|
||||||
|
|
||||||
|
pageCurrentIndex = 1;
|
||||||
currentFilterMode = tinyDB.getString("notificationsFilterState");
|
currentFilterMode = tinyDB.getString("notificationsFilterState");
|
||||||
|
|
||||||
changeFilterMode();
|
changeFilterMode();
|
||||||
loadInitial(resultLimit);
|
loadNotifications(false);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNotificationClicked(NotificationThread notificationThread) {
|
public void onNotificationClicked(NotificationThread notificationThread) {
|
||||||
|
|
||||||
Thread thread = new Thread(() -> {
|
Thread thread = new Thread(() -> {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if(notificationThread.isUnread()) {
|
if(notificationThread.isUnread()) {
|
||||||
|
|
||||||
notificationsActions.setNotificationStatus(notificationThread, NotificationsActions.NotificationStatus.READ);
|
notificationsActions.setNotificationStatus(notificationThread, NotificationsActions.NotificationStatus.READ);
|
||||||
activity.runOnUiThread(() -> loadInitial(resultLimit));
|
activity.runOnUiThread(() -> loadNotifications(false));
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch(IOException ignored) {}
|
} catch(IOException ignored) {}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
thread.start();
|
thread.start();
|
||||||
@ -331,25 +340,32 @@ public class NotificationsFragment extends Fragment implements NotificationsAdap
|
|||||||
if(StringUtils.containsAny(notificationThread.getSubject().getType().toLowerCase(), "pull", "issue")) {
|
if(StringUtils.containsAny(notificationThread.getSubject().getType().toLowerCase(), "pull", "issue")) {
|
||||||
|
|
||||||
Intent intent = new Intent(context, IssueDetailActivity.class);
|
Intent intent = new Intent(context, IssueDetailActivity.class);
|
||||||
intent.putExtra("openedFromLink", "true");
|
|
||||||
String issueUrl = notificationThread.getSubject().getUrl();
|
String issueUrl = notificationThread.getSubject().getUrl();
|
||||||
|
|
||||||
tinyDB.putString("issueNumber", issueUrl.substring(issueUrl.lastIndexOf("/") + 1));
|
tinyDB.putString("issueNumber", issueUrl.substring(issueUrl.lastIndexOf("/") + 1));
|
||||||
tinyDB.putString("issueType", notificationThread.getSubject().getType());
|
tinyDB.putString("issueType", notificationThread.getSubject().getType());
|
||||||
tinyDB.putString("repoFullName", notificationThread.getRepository().getFullName());
|
tinyDB.putString("repoFullName", notificationThread.getRepository().getFullName());
|
||||||
|
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMoreClicked(NotificationThread notificationThread) {
|
public void onMoreClicked(NotificationThread notificationThread) {
|
||||||
|
|
||||||
BottomSheetNotificationsFragment bottomSheetNotificationsFragment = new BottomSheetNotificationsFragment();
|
BottomSheetNotificationsFragment bottomSheetNotificationsFragment = new BottomSheetNotificationsFragment();
|
||||||
bottomSheetNotificationsFragment.onAttach(context, notificationThread, this);
|
bottomSheetNotificationsFragment.onAttach(context, notificationThread, this);
|
||||||
bottomSheetNotificationsFragment.show(getChildFragmentManager(), "notificationsBottomSheet");
|
bottomSheetNotificationsFragment.show(getChildFragmentManager(), "notificationsBottomSheet");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelected() {
|
public void onSelected() {
|
||||||
loadInitial(resultLimit);
|
|
||||||
|
pageCurrentIndex = 1;
|
||||||
|
loadNotifications(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ import org.mian.gitnex.clients.PicassoService;
|
|||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.databinding.FragmentOrganizationInfoBinding;
|
import org.mian.gitnex.databinding.FragmentOrganizationInfoBinding;
|
||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Markdown;
|
|
||||||
import org.mian.gitnex.helpers.RoundedTransformation;
|
import org.mian.gitnex.helpers.RoundedTransformation;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
@ -113,7 +112,7 @@ public class OrganizationInfoFragment extends Fragment {
|
|||||||
.centerCrop().into(orgAvatar);
|
.centerCrop().into(orgAvatar);
|
||||||
|
|
||||||
if(!orgInfo.getDescription().isEmpty()) {
|
if(!orgInfo.getDescription().isEmpty()) {
|
||||||
Markdown.render(ctx, orgInfo.getDescription(), orgDescInfo);
|
orgDescInfo.setText(orgInfo.getDescription());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
orgDescInfo.setText(getString(R.string.noDataDescription));
|
orgDescInfo.setText(getString(R.string.noDataDescription));
|
||||||
|
@ -12,11 +12,14 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.EditorInfo;
|
import android.view.inputmethod.EditorInfo;
|
||||||
|
import android.widget.ProgressBar;
|
||||||
|
import android.widget.TextView;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.recyclerview.widget.DividerItemDecoration;
|
import androidx.recyclerview.widget.DividerItemDecoration;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
import org.gitnex.tea4j.models.PullRequests;
|
import org.gitnex.tea4j.models.PullRequests;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
@ -28,6 +31,7 @@ import org.mian.gitnex.helpers.Authorization;
|
|||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.TinyDB;
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -40,21 +44,24 @@ import retrofit2.Response;
|
|||||||
|
|
||||||
public class PullRequestsFragment extends Fragment {
|
public class PullRequestsFragment extends Fragment {
|
||||||
|
|
||||||
private FragmentPullRequestsBinding fragmentPullRequestsBinding;
|
|
||||||
private Menu menu;
|
private Menu menu;
|
||||||
|
private ProgressBar mProgressBar;
|
||||||
|
private RecyclerView recyclerView;
|
||||||
private List<PullRequests> prList;
|
private List<PullRequests> prList;
|
||||||
private PullRequestsAdapter adapter;
|
private PullRequestsAdapter adapter;
|
||||||
private final String TAG = Constants.tagPullRequestsList;
|
private String TAG = Constants.tagPullRequestsList;
|
||||||
private Context context;
|
private Context context;
|
||||||
private int pageSize = Constants.prPageInit;
|
private int pageSize = Constants.prPageInit;
|
||||||
private int resultLimit;
|
private TextView noData;
|
||||||
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
private ProgressBar progressLoadMore;
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
|
||||||
fragmentPullRequestsBinding = FragmentPullRequestsBinding.inflate(inflater, container, false);
|
FragmentPullRequestsBinding fragmentPullRequestsBinding = FragmentPullRequestsBinding.inflate(inflater, container, false);
|
||||||
|
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
|
||||||
@ -68,30 +75,43 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
|
|
||||||
final SwipeRefreshLayout swipeRefresh = fragmentPullRequestsBinding.pullToRefresh;
|
final SwipeRefreshLayout swipeRefresh = fragmentPullRequestsBinding.pullToRefresh;
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
|
recyclerView = fragmentPullRequestsBinding.recyclerView;
|
||||||
prList = new ArrayList<>();
|
prList = new ArrayList<>();
|
||||||
|
|
||||||
|
progressLoadMore = fragmentPullRequestsBinding.progressLoadMore;
|
||||||
|
mProgressBar = fragmentPullRequestsBinding.progressBar;
|
||||||
|
noData = fragmentPullRequestsBinding.noData;
|
||||||
|
|
||||||
swipeRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
swipeRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
|
|
||||||
swipeRefresh.setRefreshing(false);
|
swipeRefresh.setRefreshing(false);
|
||||||
loadInitial(instanceToken, repoOwner, repoName, pageSize, tinyDb.getString("repoPrState"), resultLimit);
|
loadInitial(instanceToken, repoOwner, repoName, pageSize, tinyDb.getString("repoPrState"), resultLimit);
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
|
|
||||||
}, 200));
|
}, 200));
|
||||||
|
|
||||||
adapter = new PullRequestsAdapter(getContext(), prList);
|
adapter = new PullRequestsAdapter(getContext(), prList);
|
||||||
adapter.setLoadMoreListener(() -> fragmentPullRequestsBinding.recyclerView.post(() -> {
|
adapter.setLoadMoreListener(() -> recyclerView.post(() -> {
|
||||||
|
|
||||||
if(prList.size() == resultLimit || pageSize == resultLimit) {
|
if(prList.size() == resultLimit || pageSize == resultLimit) {
|
||||||
|
|
||||||
int page = (prList.size() + resultLimit) / resultLimit;
|
int page = (prList.size() + resultLimit) / resultLimit;
|
||||||
loadMore(Authorization.get(getContext()), repoOwner, repoName, page, tinyDb.getString("repoPrState"), resultLimit);
|
loadMore(Authorization.get(getContext()), repoOwner, repoName, page, tinyDb.getString("repoPrState"), resultLimit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(fragmentPullRequestsBinding.recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
DividerItemDecoration dividerItemDecoration = new DividerItemDecoration(recyclerView.getContext(), DividerItemDecoration.VERTICAL);
|
||||||
fragmentPullRequestsBinding.recyclerView.setHasFixedSize(true);
|
recyclerView.setHasFixedSize(true);
|
||||||
fragmentPullRequestsBinding.recyclerView.addItemDecoration(dividerItemDecoration);
|
recyclerView.addItemDecoration(dividerItemDecoration);
|
||||||
fragmentPullRequestsBinding.recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
recyclerView.setLayoutManager(new LinearLayoutManager(context));
|
||||||
fragmentPullRequestsBinding.recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
((RepoDetailActivity) requireActivity()).setFragmentRefreshListenerPr(prState -> {
|
((RepoDetailActivity) requireActivity()).setFragmentRefreshListenerPr(prState -> {
|
||||||
|
|
||||||
@ -105,27 +125,31 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
prList.clear();
|
prList.clear();
|
||||||
|
|
||||||
adapter = new PullRequestsAdapter(context, prList);
|
adapter = new PullRequestsAdapter(context, prList);
|
||||||
adapter.setLoadMoreListener(() -> fragmentPullRequestsBinding.recyclerView.post(() -> {
|
adapter.setLoadMoreListener(() -> recyclerView.post(() -> {
|
||||||
|
|
||||||
if(prList.size() == resultLimit || pageSize == resultLimit) {
|
if(prList.size() == resultLimit || pageSize == resultLimit) {
|
||||||
|
|
||||||
int page = (prList.size() + resultLimit) / resultLimit;
|
int page = (prList.size() + resultLimit) / resultLimit;
|
||||||
loadMore(Authorization.get(getContext()), repoOwner, repoName, page, tinyDb.getString("repoPrState"), resultLimit);
|
loadMore(Authorization.get(getContext()), repoOwner, repoName, page, tinyDb.getString("repoPrState"), resultLimit);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
tinyDb.putString("repoPrState", prState);
|
tinyDb.putString("repoPrState", prState);
|
||||||
|
|
||||||
fragmentPullRequestsBinding.progressBar.setVisibility(View.VISIBLE);
|
mProgressBar.setVisibility(View.VISIBLE);
|
||||||
fragmentPullRequestsBinding.noData.setVisibility(View.GONE);
|
noData.setVisibility(View.GONE);
|
||||||
|
|
||||||
loadInitial(Authorization.get(context), repoOwner, repoName, pageSize, prState, resultLimit);
|
loadInitial(Authorization.get(context), repoOwner, repoName, pageSize, prState, resultLimit);
|
||||||
fragmentPullRequestsBinding.recyclerView.setAdapter(adapter);
|
recyclerView.setAdapter(adapter);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
loadInitial(Authorization.get(getContext()), repoOwner, repoName, pageSize, tinyDb.getString("repoPrState"), resultLimit);
|
loadInitial(Authorization.get(getContext()), repoOwner, repoName, pageSize, tinyDb.getString("repoPrState"), resultLimit);
|
||||||
|
|
||||||
return fragmentPullRequestsBinding.getRoot();
|
return fragmentPullRequestsBinding.getRoot();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -140,10 +164,13 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
final String repoName = parts[1];
|
final String repoName = parts[1];
|
||||||
|
|
||||||
if(tinyDb.getBoolean("resumePullRequests")) {
|
if(tinyDb.getBoolean("resumePullRequests")) {
|
||||||
|
|
||||||
loadInitial(Authorization.get(getContext()), repoOwner, repoName, pageSize, tinyDb.getString("repoPrState"), resultLimit);
|
loadInitial(Authorization.get(getContext()), repoOwner, repoName, pageSize, tinyDb.getString("repoPrState"), resultLimit);
|
||||||
tinyDb.putBoolean("resumePullRequests", false);
|
tinyDb.putBoolean("resumePullRequests", false);
|
||||||
tinyDb.putBoolean("prMerged", false);
|
tinyDb.putBoolean("prMerged", false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadInitial(String token, String repoOwner, String repoName, int page, String prState, int resultLimit) {
|
private void loadInitial(String token, String repoOwner, String repoName, int page, String prState, int resultLimit) {
|
||||||
@ -159,26 +186,38 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
|
|
||||||
assert response.body() != null;
|
assert response.body() != null;
|
||||||
if(response.body().size() > 0) {
|
if(response.body().size() > 0) {
|
||||||
|
|
||||||
prList.clear();
|
prList.clear();
|
||||||
prList.addAll(response.body());
|
prList.addAll(response.body());
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentPullRequestsBinding.noData.setVisibility(View.GONE);
|
noData.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
prList.clear();
|
prList.clear();
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentPullRequestsBinding.noData.setVisibility(View.VISIBLE);
|
noData.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
}
|
}
|
||||||
fragmentPullRequestsBinding.progressBar.setVisibility(View.GONE);
|
|
||||||
|
mProgressBar.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(response.code() == 404) {
|
else if(response.code() == 404) {
|
||||||
fragmentPullRequestsBinding.noData.setVisibility(View.VISIBLE);
|
|
||||||
fragmentPullRequestsBinding.progressBar.setVisibility(View.GONE);
|
noData.setVisibility(View.VISIBLE);
|
||||||
|
mProgressBar.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
Log.i(TAG, String.valueOf(response.code()));
|
Log.i(TAG, String.valueOf(response.code()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.i(TAG, String.valueOf(response.code()));
|
Log.i(TAG, String.valueOf(response.code()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -186,12 +225,14 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
|
|
||||||
Log.e(TAG, t.toString());
|
Log.e(TAG, t.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadMore(String token, String repoOwner, String repoName, int page, String prState, int resultLimit) {
|
private void loadMore(String token, String repoOwner, String repoName, int page, String prState, int resultLimit) {
|
||||||
|
|
||||||
fragmentPullRequestsBinding.progressBar.setVisibility(View.VISIBLE);
|
progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<PullRequests>> call = RetrofitClient.getApiInterface(context).getPullRequests(token, repoOwner, repoName, page, prState, resultLimit);
|
Call<List<PullRequests>> call = RetrofitClient.getApiInterface(context).getPullRequests(token, repoOwner, repoName, page, prState, resultLimit);
|
||||||
|
|
||||||
@ -204,30 +245,42 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
|
|
||||||
//remove loading view
|
//remove loading view
|
||||||
prList.remove(prList.size() - 1);
|
prList.remove(prList.size() - 1);
|
||||||
|
|
||||||
List<PullRequests> result = response.body();
|
List<PullRequests> result = response.body();
|
||||||
|
|
||||||
assert result != null;
|
assert result != null;
|
||||||
if(result.size() > 0) {
|
if(result.size() > 0) {
|
||||||
|
|
||||||
pageSize = result.size();
|
pageSize = result.size();
|
||||||
prList.addAll(result);
|
prList.addAll(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
Toasty.info(context, getString(R.string.noMoreData));
|
Toasty.info(context, getString(R.string.noMoreData));
|
||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentPullRequestsBinding.progressBar.setVisibility(View.GONE);
|
progressLoadMore.setVisibility(View.GONE);
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
Log.e(TAG, String.valueOf(response.code()));
|
Log.e(TAG, String.valueOf(response.code()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(@NonNull Call<List<PullRequests>> call, @NonNull Throwable t) {
|
public void onFailure(@NonNull Call<List<PullRequests>> call, @NonNull Throwable t) {
|
||||||
|
|
||||||
Log.e(TAG, t.toString());
|
Log.e(TAG, t.toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,15 +309,20 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextSubmit(String query) {
|
public boolean onQueryTextSubmit(String query) {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onQueryTextChange(String newText) {
|
public boolean onQueryTextChange(String newText) {
|
||||||
|
|
||||||
filter(newText);
|
filter(newText);
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void filter(String text) {
|
private void filter(String text) {
|
||||||
@ -275,10 +333,12 @@ public class PullRequestsFragment extends Fragment {
|
|||||||
if(d == null || d.getTitle() == null || d.getBody() == null) {
|
if(d == null || d.getTitle() == null || d.getBody() == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if(d.getTitle().toLowerCase().contains(text) || d.getBody().toLowerCase().contains(text) || String.valueOf(d.getNumber()).startsWith(text)) {
|
if(d.getTitle().toLowerCase().contains(text) || d.getBody().toLowerCase().contains(text)) {
|
||||||
arr.add(d);
|
arr.add(d);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
adapter.updateList(arr);
|
adapter.updateList(arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ import androidx.recyclerview.widget.DividerItemDecoration;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
|
||||||
|
import org.gitnex.tea4j.models.IssueComments;
|
||||||
import org.gitnex.tea4j.models.Releases;
|
import org.gitnex.tea4j.models.Releases;
|
||||||
import org.mian.gitnex.adapters.ReleasesAdapter;
|
import org.mian.gitnex.adapters.ReleasesAdapter;
|
||||||
import org.mian.gitnex.databinding.FragmentReleasesBinding;
|
import org.mian.gitnex.databinding.FragmentReleasesBinding;
|
||||||
|
@ -42,6 +42,7 @@ public class RepoInfoFragment extends Fragment {
|
|||||||
private LinearLayout pageContent;
|
private LinearLayout pageContent;
|
||||||
private static final String repoNameF = "param2";
|
private static final String repoNameF = "param2";
|
||||||
private static final String repoOwnerF = "param1";
|
private static final String repoOwnerF = "param1";
|
||||||
|
private Locale locale;
|
||||||
|
|
||||||
private FragmentRepoInfoBinding binding;
|
private FragmentRepoInfoBinding binding;
|
||||||
|
|
||||||
@ -76,7 +77,7 @@ public class RepoInfoFragment extends Fragment {
|
|||||||
binding = FragmentRepoInfoBinding.inflate(inflater, container, false);
|
binding = FragmentRepoInfoBinding.inflate(inflater, container, false);
|
||||||
TinyDB tinyDb = TinyDB.getInstance(getContext());
|
TinyDB tinyDb = TinyDB.getInstance(getContext());
|
||||||
ctx = getContext();
|
ctx = getContext();
|
||||||
Locale locale = getResources().getConfiguration().locale;
|
locale = getResources().getConfiguration().locale;
|
||||||
|
|
||||||
pageContent = binding.repoInfoLayout;
|
pageContent = binding.repoInfoLayout;
|
||||||
pageContent.setVisibility(View.GONE);
|
pageContent.setVisibility(View.GONE);
|
||||||
@ -197,7 +198,7 @@ public class RepoInfoFragment extends Fragment {
|
|||||||
binding.repoMetaName.setText(repoInfo.getName());
|
binding.repoMetaName.setText(repoInfo.getName());
|
||||||
|
|
||||||
if(!repoInfo.getDescription().isEmpty()) {
|
if(!repoInfo.getDescription().isEmpty()) {
|
||||||
Markdown.render(ctx, repoInfo.getDescription(), binding.repoMetaDescription);
|
binding.repoMetaDescription.setText(repoInfo.getDescription());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
binding.repoMetaDescription.setText(getString(R.string.noDataDescription));
|
binding.repoMetaDescription.setText(getString(R.string.noDataDescription));
|
||||||
|
@ -149,7 +149,6 @@ public class DetailFragment extends Fragment {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
binding.progressBar.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,7 +25,9 @@ import org.mian.gitnex.helpers.AlertDialogs;
|
|||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.SnackBar;
|
||||||
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -45,7 +47,7 @@ public class FollowersFragment extends Fragment {
|
|||||||
private FollowersAdapter adapter;
|
private FollowersAdapter adapter;
|
||||||
|
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private int resultLimit;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
private static final String usernameBundle = "";
|
private static final String usernameBundle = "";
|
||||||
private String username;
|
private String username;
|
||||||
@ -76,7 +78,13 @@ public class FollowersFragment extends Fragment {
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
usersList = new ArrayList<>();
|
usersList = new ArrayList<>();
|
||||||
|
|
||||||
fragmentProfileFollowersFollowingBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
fragmentProfileFollowersFollowingBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
@ -164,7 +172,7 @@ public class FollowersFragment extends Fragment {
|
|||||||
|
|
||||||
private void loadMore(String token, String username, int page, int resultLimit) {
|
private void loadMore(String token, String username, int page, int resultLimit) {
|
||||||
|
|
||||||
fragmentProfileFollowersFollowingBinding.progressBar.setVisibility(View.VISIBLE);
|
fragmentProfileFollowersFollowingBinding.progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<UserInfo>> call = RetrofitClient
|
Call<List<UserInfo>> call = RetrofitClient
|
||||||
.getApiInterface(context)
|
.getApiInterface(context)
|
||||||
@ -190,7 +198,7 @@ public class FollowersFragment extends Fragment {
|
|||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentProfileFollowersFollowingBinding.progressBar.setVisibility(View.GONE);
|
fragmentProfileFollowersFollowingBinding.progressLoadMore.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 401:
|
case 401:
|
||||||
|
@ -18,6 +18,7 @@ import androidx.recyclerview.widget.DividerItemDecoration;
|
|||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
import org.gitnex.tea4j.models.UserInfo;
|
import org.gitnex.tea4j.models.UserInfo;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
|
import org.mian.gitnex.adapters.profile.FollowersAdapter;
|
||||||
import org.mian.gitnex.adapters.profile.FollowingAdapter;
|
import org.mian.gitnex.adapters.profile.FollowingAdapter;
|
||||||
import org.mian.gitnex.clients.RetrofitClient;
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
import org.mian.gitnex.databinding.FragmentProfileFollowersFollowingBinding;
|
import org.mian.gitnex.databinding.FragmentProfileFollowersFollowingBinding;
|
||||||
@ -25,7 +26,9 @@ import org.mian.gitnex.helpers.AlertDialogs;
|
|||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.SnackBar;
|
||||||
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -45,7 +48,7 @@ public class FollowingFragment extends Fragment {
|
|||||||
private FollowingAdapter adapter;
|
private FollowingAdapter adapter;
|
||||||
|
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private int resultLimit;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
private static final String usernameBundle = "";
|
private static final String usernameBundle = "";
|
||||||
private String username;
|
private String username;
|
||||||
@ -76,7 +79,13 @@ public class FollowingFragment extends Fragment {
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
usersList = new ArrayList<>();
|
usersList = new ArrayList<>();
|
||||||
|
|
||||||
fragmentProfileFollowersFollowingBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
fragmentProfileFollowersFollowingBinding.pullToRefresh.setOnRefreshListener(() -> new Handler(Looper.getMainLooper()).postDelayed(() -> {
|
||||||
@ -164,7 +173,7 @@ public class FollowingFragment extends Fragment {
|
|||||||
|
|
||||||
private void loadMore(String token, String username, int page, int resultLimit) {
|
private void loadMore(String token, String username, int page, int resultLimit) {
|
||||||
|
|
||||||
fragmentProfileFollowersFollowingBinding.progressBar.setVisibility(View.VISIBLE);
|
fragmentProfileFollowersFollowingBinding.progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<UserInfo>> call = RetrofitClient
|
Call<List<UserInfo>> call = RetrofitClient
|
||||||
.getApiInterface(context)
|
.getApiInterface(context)
|
||||||
@ -190,7 +199,7 @@ public class FollowingFragment extends Fragment {
|
|||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentProfileFollowersFollowingBinding.progressBar.setVisibility(View.GONE);
|
fragmentProfileFollowersFollowingBinding.progressLoadMore.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 401:
|
case 401:
|
||||||
|
@ -25,7 +25,9 @@ import org.mian.gitnex.helpers.AlertDialogs;
|
|||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.SnackBar;
|
||||||
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -45,7 +47,7 @@ public class OrganizationsFragment extends Fragment {
|
|||||||
private OrganizationsAdapter adapter;
|
private OrganizationsAdapter adapter;
|
||||||
|
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private int resultLimit;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
private static final String usernameBundle = "";
|
private static final String usernameBundle = "";
|
||||||
private String username;
|
private String username;
|
||||||
@ -76,7 +78,13 @@ public class OrganizationsFragment extends Fragment {
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
organizationsList = new ArrayList<>();
|
organizationsList = new ArrayList<>();
|
||||||
|
|
||||||
fragmentOrganizationsBinding.addNewOrganization.setVisibility(View.GONE);
|
fragmentOrganizationsBinding.addNewOrganization.setVisibility(View.GONE);
|
||||||
@ -166,7 +174,7 @@ public class OrganizationsFragment extends Fragment {
|
|||||||
|
|
||||||
private void loadMore(String token, String username, int page, int resultLimit) {
|
private void loadMore(String token, String username, int page, int resultLimit) {
|
||||||
|
|
||||||
fragmentOrganizationsBinding.progressBar.setVisibility(View.VISIBLE);
|
fragmentOrganizationsBinding.progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<UserOrganizations>> call = RetrofitClient
|
Call<List<UserOrganizations>> call = RetrofitClient
|
||||||
.getApiInterface(context)
|
.getApiInterface(context)
|
||||||
@ -192,7 +200,7 @@ public class OrganizationsFragment extends Fragment {
|
|||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentOrganizationsBinding.progressBar.setVisibility(View.GONE);
|
fragmentOrganizationsBinding.progressLoadMore.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 401:
|
case 401:
|
||||||
|
@ -25,7 +25,9 @@ import org.mian.gitnex.helpers.AlertDialogs;
|
|||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.SnackBar;
|
||||||
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -45,7 +47,7 @@ public class RepositoriesFragment extends Fragment {
|
|||||||
private RepositoriesAdapter adapter;
|
private RepositoriesAdapter adapter;
|
||||||
|
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private int resultLimit;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
private static final String usernameBundle = "";
|
private static final String usernameBundle = "";
|
||||||
private String username;
|
private String username;
|
||||||
@ -76,7 +78,13 @@ public class RepositoriesFragment extends Fragment {
|
|||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
reposList = new ArrayList<>();
|
reposList = new ArrayList<>();
|
||||||
|
|
||||||
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
|
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
|
||||||
@ -165,7 +173,7 @@ public class RepositoriesFragment extends Fragment {
|
|||||||
|
|
||||||
private void loadMore(String token, String username, int page, int resultLimit) {
|
private void loadMore(String token, String username, int page, int resultLimit) {
|
||||||
|
|
||||||
fragmentRepositoriesBinding.progressBar.setVisibility(View.VISIBLE);
|
fragmentRepositoriesBinding.progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<UserRepositories>> call = RetrofitClient.getApiInterface(context).getUserProfileRepositories(token, username, page, resultLimit);
|
Call<List<UserRepositories>> call = RetrofitClient.getApiInterface(context).getUserProfileRepositories(token, username, page, resultLimit);
|
||||||
|
|
||||||
@ -189,7 +197,7 @@ public class RepositoriesFragment extends Fragment {
|
|||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentRepositoriesBinding.progressBar.setVisibility(View.GONE);
|
fragmentRepositoriesBinding.progressLoadMore.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 401:
|
case 401:
|
||||||
|
@ -25,7 +25,9 @@ import org.mian.gitnex.helpers.AlertDialogs;
|
|||||||
import org.mian.gitnex.helpers.Authorization;
|
import org.mian.gitnex.helpers.Authorization;
|
||||||
import org.mian.gitnex.helpers.Constants;
|
import org.mian.gitnex.helpers.Constants;
|
||||||
import org.mian.gitnex.helpers.SnackBar;
|
import org.mian.gitnex.helpers.SnackBar;
|
||||||
|
import org.mian.gitnex.helpers.TinyDB;
|
||||||
import org.mian.gitnex.helpers.Toasty;
|
import org.mian.gitnex.helpers.Toasty;
|
||||||
|
import org.mian.gitnex.helpers.Version;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
@ -45,7 +47,7 @@ public class StarredRepositoriesFragment extends Fragment {
|
|||||||
private StarredRepositoriesAdapter adapter;
|
private StarredRepositoriesAdapter adapter;
|
||||||
|
|
||||||
private int pageSize;
|
private int pageSize;
|
||||||
private int resultLimit;
|
private int resultLimit = Constants.resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
private static final String usernameBundle = "";
|
private static final String usernameBundle = "";
|
||||||
private String username;
|
private String username;
|
||||||
@ -75,8 +77,13 @@ public class StarredRepositoriesFragment extends Fragment {
|
|||||||
fragmentRepositoriesBinding = org.mian.gitnex.databinding.FragmentRepositoriesBinding.inflate(inflater, container, false);
|
fragmentRepositoriesBinding = org.mian.gitnex.databinding.FragmentRepositoriesBinding.inflate(inflater, container, false);
|
||||||
setHasOptionsMenu(true);
|
setHasOptionsMenu(true);
|
||||||
context = getContext();
|
context = getContext();
|
||||||
|
TinyDB tinyDb = TinyDB.getInstance(context);
|
||||||
|
|
||||||
|
// if gitea is 1.12 or higher use the new limit
|
||||||
|
if(new Version(tinyDb.getString("giteaVersion")).higherOrEqual("1.12.0")) {
|
||||||
|
resultLimit = Constants.resultLimitNewGiteaInstances;
|
||||||
|
}
|
||||||
|
|
||||||
resultLimit = Constants.getCurrentResultLimit(context);
|
|
||||||
reposList = new ArrayList<>();
|
reposList = new ArrayList<>();
|
||||||
|
|
||||||
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
|
fragmentRepositoriesBinding.addNewRepo.setVisibility(View.GONE);
|
||||||
@ -166,7 +173,7 @@ public class StarredRepositoriesFragment extends Fragment {
|
|||||||
|
|
||||||
private void loadMore(String token, String username, int page, int resultLimit) {
|
private void loadMore(String token, String username, int page, int resultLimit) {
|
||||||
|
|
||||||
fragmentRepositoriesBinding.progressBar.setVisibility(View.VISIBLE);
|
fragmentRepositoriesBinding.progressLoadMore.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
Call<List<UserRepositories>> call = RetrofitClient
|
Call<List<UserRepositories>> call = RetrofitClient
|
||||||
.getApiInterface(context)
|
.getApiInterface(context)
|
||||||
@ -192,7 +199,7 @@ public class StarredRepositoriesFragment extends Fragment {
|
|||||||
adapter.setMoreDataAvailable(false);
|
adapter.setMoreDataAvailable(false);
|
||||||
}
|
}
|
||||||
adapter.notifyDataChanged();
|
adapter.notifyDataChanged();
|
||||||
fragmentRepositoriesBinding.progressBar.setVisibility(View.GONE);
|
fragmentRepositoriesBinding.progressLoadMore.setVisibility(View.GONE);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 401:
|
case 401:
|
||||||
|
@ -1,15 +1,10 @@
|
|||||||
package org.mian.gitnex.helpers;
|
package org.mian.gitnex.helpers;
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.graphics.drawable.ColorDrawable;
|
|
||||||
import android.widget.Button;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import org.mian.gitnex.R;
|
import org.mian.gitnex.R;
|
||||||
import org.mian.gitnex.actions.CollaboratorActions;
|
import org.mian.gitnex.actions.CollaboratorActions;
|
||||||
import org.mian.gitnex.actions.PullRequestActions;
|
|
||||||
import org.mian.gitnex.actions.TeamActions;
|
import org.mian.gitnex.actions.TeamActions;
|
||||||
import org.mian.gitnex.activities.CreateLabelActivity;
|
import org.mian.gitnex.activities.CreateLabelActivity;
|
||||||
import org.mian.gitnex.activities.LoginActivity;
|
import org.mian.gitnex.activities.LoginActivity;
|
||||||
@ -117,27 +112,4 @@ public class AlertDialogs {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void selectPullUpdateStrategy(Context context, String repoOwner, String repo, String issueNumber) {
|
|
||||||
Dialog dialog = new Dialog(context, R.style.ThemeOverlay_MaterialComponents_Dialog_Alert);
|
|
||||||
|
|
||||||
if (dialog.getWindow() != null) {
|
|
||||||
dialog.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
|
|
||||||
}
|
|
||||||
|
|
||||||
dialog.setContentView(R.layout.custom_pr_update_strategy_dialog);
|
|
||||||
Button mergeBtn = dialog.findViewById(R.id.updatePullMerge);
|
|
||||||
Button rebaseBtn = dialog.findViewById(R.id.updatePullRebase);
|
|
||||||
Button cancelBtn = dialog.findViewById(R.id.cancelPullUpdate);
|
|
||||||
mergeBtn.setOnClickListener((v) -> {
|
|
||||||
PullRequestActions.updatePr(context, repoOwner, repo, issueNumber, false);
|
|
||||||
dialog.dismiss();
|
|
||||||
});
|
|
||||||
rebaseBtn.setOnClickListener((v) -> {
|
|
||||||
PullRequestActions.updatePr(context, repoOwner, repo, issueNumber, true);
|
|
||||||
dialog.dismiss();
|
|
||||||
});
|
|
||||||
cancelBtn.setOnClickListener((v) -> dialog.dismiss());
|
|
||||||
dialog.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,13 +14,15 @@ public class Constants {
|
|||||||
public static final String defaultOldestTimestamp = "1970-01-01T00:00:00+00:00";
|
public static final String defaultOldestTimestamp = "1970-01-01T00:00:00+00:00";
|
||||||
|
|
||||||
public static int getCurrentResultLimit(Context context) {
|
public static int getCurrentResultLimit(Context context) {
|
||||||
|
|
||||||
Version version = new Version(TinyDB.getInstance(context).getString("giteaVersion"));
|
Version version = new Version(TinyDB.getInstance(context).getString("giteaVersion"));
|
||||||
return version.higherOrEqual("1.12") ? resultLimitNewGiteaInstances : resultLimitOldGiteaInstances;
|
return version.higherOrEqual("1.12") ? resultLimitNewGiteaInstances : resultLimitOldGiteaInstances;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// tags
|
// tags
|
||||||
public static final String tagMilestonesFragment = "MilestonesFragment";
|
public static final String tagMilestonesFragment = "MilestonesFragment";
|
||||||
public static final String tagPullRequestsList = "PullRequestFragment";
|
public static final String tagPullRequestsList = "PullRequestsListFragment";
|
||||||
public static final String tagIssuesList = "IssuesListFragment";
|
public static final String tagIssuesList = "IssuesListFragment";
|
||||||
public static final String tagMilestonesAdapter = "MilestonesAdapter";
|
public static final String tagMilestonesAdapter = "MilestonesAdapter";
|
||||||
public static final String draftsApi = "DraftsApi";
|
public static final String draftsApi = "DraftsApi";
|
||||||
@ -28,12 +30,6 @@ public class Constants {
|
|||||||
public static final String tagDraftsBottomSheet = "BottomSheetDraftsFragment";
|
public static final String tagDraftsBottomSheet = "BottomSheetDraftsFragment";
|
||||||
public static final String userAccountsApi = "UserAccountsApi";
|
public static final String userAccountsApi = "UserAccountsApi";
|
||||||
public static final String publicOrganizations = "PublicOrganizations";
|
public static final String publicOrganizations = "PublicOrganizations";
|
||||||
public static final String exploreUsers = "ExploreUsers";
|
|
||||||
public static final String exploreIssues = "ExploreIssues";
|
|
||||||
public static final String exploreRepositories = "ExploreRepositories";
|
|
||||||
public static final String tagNotifications = "TagNotifications";
|
|
||||||
public static final String tagFollowers = "TagFollowers";
|
|
||||||
public static final String tagFollowing = "TagFollowing";
|
|
||||||
|
|
||||||
// issues variables
|
// issues variables
|
||||||
public static final int issuesPageInit = 1;
|
public static final int issuesPageInit = 1;
|
||||||
|
@ -0,0 +1,92 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2016 Piotr Wittchen
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.mian.gitnex.helpers;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InfiniteScrollListener, which can be added to RecyclerView with addOnScrollListener
|
||||||
|
* to detect moment when RecyclerView was scrolled to the end.
|
||||||
|
*/
|
||||||
|
public abstract class InfiniteScrollListener extends RecyclerView.OnScrollListener {
|
||||||
|
private final int maxItemsPerRequest;
|
||||||
|
private final LinearLayoutManager layoutManager;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initializes InfiniteScrollListener, which can be added
|
||||||
|
* to RecyclerView with addOnScrollListener method
|
||||||
|
*
|
||||||
|
* @param maxItemsPerRequest Max items to be loaded in a single request.
|
||||||
|
* @param layoutManager LinearLayoutManager created in the Activity.
|
||||||
|
*/
|
||||||
|
public InfiniteScrollListener(int maxItemsPerRequest, LinearLayoutManager layoutManager) {
|
||||||
|
assert maxItemsPerRequest > 0;
|
||||||
|
assert layoutManager != null;
|
||||||
|
|
||||||
|
this.maxItemsPerRequest = maxItemsPerRequest;
|
||||||
|
this.layoutManager = layoutManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback method to be invoked when the RecyclerView has been scrolled
|
||||||
|
*
|
||||||
|
* @param recyclerView The RecyclerView which scrolled.
|
||||||
|
* @param dx The amount of horizontal scroll.
|
||||||
|
* @param dy The amount of vertical scroll.
|
||||||
|
*/
|
||||||
|
@Override public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
|
||||||
|
super.onScrolled(recyclerView, dx, dy);
|
||||||
|
if (canLoadMoreItems()) {
|
||||||
|
onScrolledToEnd(layoutManager.findFirstVisibleItemPosition());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refreshes RecyclerView by setting new adapter,
|
||||||
|
* calling invalidate method and scrolling to given position
|
||||||
|
*
|
||||||
|
* @param view RecyclerView to be refreshed
|
||||||
|
* @param adapter adapter with new list of items to be loaded
|
||||||
|
* @param position position to which RecyclerView will be scrolled
|
||||||
|
*/
|
||||||
|
protected void refreshView(RecyclerView view, RecyclerView.Adapter adapter, int position) {
|
||||||
|
view.setAdapter(adapter);
|
||||||
|
view.invalidate();
|
||||||
|
view.scrollToPosition(position);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if more items can be loaded to the RecyclerView
|
||||||
|
*
|
||||||
|
* @return boolean Returns true if can load more items or false if not.
|
||||||
|
*/
|
||||||
|
protected boolean canLoadMoreItems() {
|
||||||
|
final int visibleItemsCount = layoutManager.getChildCount();
|
||||||
|
final int totalItemsCount = layoutManager.getItemCount();
|
||||||
|
final int pastVisibleItemsCount = layoutManager.findFirstVisibleItemPosition();
|
||||||
|
final boolean lastItemShown = visibleItemsCount + pastVisibleItemsCount >= totalItemsCount;
|
||||||
|
return lastItemShown && totalItemsCount >= maxItemsPerRequest;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callback method to be invoked when the RecyclerView has been scrolled to the end
|
||||||
|
*
|
||||||
|
* @param firstVisibleItemPosition Id of the first visible item on the list.
|
||||||
|
*/
|
||||||
|
public abstract void onScrolledToEnd(final int firstVisibleItemPosition);
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package org.mian.gitnex.viewmodels;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.lifecycle.ViewModel;
|
||||||
|
import org.gitnex.tea4j.models.UserInfo;
|
||||||
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import java.util.List;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Author M M Arif
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ProfileFollowersViewModel extends ViewModel {
|
||||||
|
|
||||||
|
private static MutableLiveData<List<UserInfo>> followersList;
|
||||||
|
|
||||||
|
public LiveData<List<UserInfo>> getFollowersList(String token, Context ctx) {
|
||||||
|
|
||||||
|
followersList = new MutableLiveData<>();
|
||||||
|
loadFollowersList(token, ctx);
|
||||||
|
|
||||||
|
return followersList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void loadFollowersList(String token, Context ctx) {
|
||||||
|
|
||||||
|
Call<List<UserInfo>> call = RetrofitClient
|
||||||
|
.getApiInterface(ctx)
|
||||||
|
.getFollowers(token, 1, 50);
|
||||||
|
|
||||||
|
call.enqueue(new Callback<List<UserInfo>>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
|
||||||
|
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
followersList.postValue(response.body());
|
||||||
|
} else {
|
||||||
|
Log.i("onResponse", String.valueOf(response.code()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call<List<UserInfo>> call, @NonNull Throwable t) {
|
||||||
|
Log.i("onFailure", t.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,59 @@
|
|||||||
|
package org.mian.gitnex.viewmodels;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.lifecycle.LiveData;
|
||||||
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
import androidx.lifecycle.ViewModel;
|
||||||
|
import org.gitnex.tea4j.models.UserInfo;
|
||||||
|
import org.mian.gitnex.clients.RetrofitClient;
|
||||||
|
import java.util.List;
|
||||||
|
import retrofit2.Call;
|
||||||
|
import retrofit2.Callback;
|
||||||
|
import retrofit2.Response;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Author M M Arif
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ProfileFollowingViewModel extends ViewModel {
|
||||||
|
|
||||||
|
private static MutableLiveData<List<UserInfo>> followingList;
|
||||||
|
|
||||||
|
public LiveData<List<UserInfo>> getFollowingList(String token, Context ctx) {
|
||||||
|
|
||||||
|
followingList = new MutableLiveData<>();
|
||||||
|
loadFollowingList(token, ctx);
|
||||||
|
|
||||||
|
return followingList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void loadFollowingList(String token, Context ctx) {
|
||||||
|
|
||||||
|
Call<List<UserInfo>> call = RetrofitClient
|
||||||
|
.getApiInterface(ctx)
|
||||||
|
.getFollowing(token, 1, 50);
|
||||||
|
|
||||||
|
call.enqueue(new Callback<List<UserInfo>>() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onResponse(@NonNull Call<List<UserInfo>> call, @NonNull Response<List<UserInfo>> response) {
|
||||||
|
|
||||||
|
if (response.isSuccessful()) {
|
||||||
|
followingList.postValue(response.body());
|
||||||
|
} else {
|
||||||
|
Log.i("onResponse", String.valueOf(response.code()));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFailure(@NonNull Call<List<UserInfo>> call, @NonNull Throwable t) {
|
||||||
|
Log.i("onFailure", t.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,27 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
<path
|
|
||||||
android:pathData="M16,21v-2a4,4 0,0 0,-4 -4H5a4,4 0,0 0,-4 4v2"
|
|
||||||
android:strokeLineJoin="round"
|
|
||||||
android:strokeWidth="2"
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:strokeColor="?attr/iconsColor"
|
|
||||||
android:strokeLineCap="round"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M8.5,7m-4,0a4,4 0,1 1,8 0a4,4 0,1 1,-8 0"
|
|
||||||
android:strokeLineJoin="round"
|
|
||||||
android:strokeWidth="2"
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:strokeColor="?attr/iconsColor"
|
|
||||||
android:strokeLineCap="round"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M23,11L17,11"
|
|
||||||
android:strokeLineJoin="round"
|
|
||||||
android:strokeWidth="2"
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:strokeColor="?attr/iconsColor"
|
|
||||||
android:strokeLineCap="round"/>
|
|
||||||
</vector>
|
|
@ -1,27 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24">
|
|
||||||
<path
|
|
||||||
android:pathData="M23,4l0,6l-6,0"
|
|
||||||
android:strokeLineJoin="round"
|
|
||||||
android:strokeWidth="2"
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:strokeColor="?attr/iconsColor"
|
|
||||||
android:strokeLineCap="round"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M1,20l0,-6l6,0"
|
|
||||||
android:strokeLineJoin="round"
|
|
||||||
android:strokeWidth="2"
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:strokeColor="?attr/iconsColor"
|
|
||||||
android:strokeLineCap="round"/>
|
|
||||||
<path
|
|
||||||
android:pathData="M3.51,9a9,9 0,0 1,14.85 -3.36L23,10M1,14l4.64,4.36A9,9 0,0 0,20.49 15"
|
|
||||||
android:strokeLineJoin="round"
|
|
||||||
android:strokeWidth="2"
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:strokeColor="?attr/iconsColor"
|
|
||||||
android:strokeLineCap="round"/>
|
|
||||||
</vector>
|
|
@ -122,7 +122,7 @@
|
|||||||
android:id="@+id/explore"
|
android:id="@+id/explore"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="60dp"
|
||||||
android:text="@string/pageTitleExplore"
|
android:text="@string/navExplore"
|
||||||
android:textColor="@color/btnTextColor"
|
android:textColor="@color/btnTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:layout_marginTop="8dp" />
|
android:layout_marginTop="8dp" />
|
||||||
|
@ -18,22 +18,6 @@
|
|||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/filterByMilestone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:focusable="true"
|
|
||||||
android:clickable="true"
|
|
||||||
android:drawablePadding="24dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="@string/newIssueMilestoneTitle"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:drawableStartCompat="@drawable/ic_milestone" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/openIssues"
|
android:id="@+id/openIssues"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -58,21 +58,6 @@
|
|||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
app:drawableStartCompat="@drawable/ic_pull_request" />
|
app:drawableStartCompat="@drawable/ic_pull_request" />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/updatePullRequest"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:focusable="true"
|
|
||||||
android:clickable="true"
|
|
||||||
android:drawablePadding="24dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="@string/updatePullRequestText"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_update" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/deletePrHeadBranch"
|
android:id="@+id/deletePrHeadBranch"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,40 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:paddingTop="6dp"
|
|
||||||
android:paddingBottom="12dp"
|
|
||||||
android:background="?attr/primaryBackgroundColor">
|
|
||||||
|
|
||||||
<androidx.core.widget.NestedScrollView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/followUnfollowUser"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:focusable="true"
|
|
||||||
android:clickable="true"
|
|
||||||
android:drawablePadding="24dp"
|
|
||||||
android:padding="12dp"
|
|
||||||
android:text="@string/userFollow"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:drawableStartCompat="@drawable/ic_person_add" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -1,71 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/shape_custom_dialog">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/selectStrategy"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:text="@string/selectUpdateStrategy"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:padding="16dp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/dividerTop"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:background="?attr/dividerColor"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/selectStrategy" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/updatePullMerge"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:textColor="@color/colorWhite"
|
|
||||||
android:text="@string/updateStrategyMerge"
|
|
||||||
app:layout_constraintEnd_toStartOf="@id/updatePullRebase"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/selectStrategy" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/updatePullRebase"
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:textColor="@color/colorWhite"
|
|
||||||
android:text="@string/updateStrategyRebase"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toEndOf="@id/updatePullMerge"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/selectStrategy" />
|
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/dividerBottom"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="1dp"
|
|
||||||
android:layout_marginTop="16dp"
|
|
||||||
android:background="?attr/dividerColor"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/updatePullMerge" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/cancelPullUpdate"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
style="?android:attr/button"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:text="@string/cancelButton"
|
|
||||||
android:textColor="@color/colorWhite"
|
|
||||||
android:layout_margin="16dp"
|
|
||||||
android:textSize="16sp"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/dividerBottom"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent" />
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
||||||
android:id="@+id/progressBar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:indeterminate="true"
|
|
||||||
android:minWidth="360dp"
|
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -16,20 +16,40 @@
|
|||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tabsExplore"
|
android:id="@+id/tabsExplore"
|
||||||
|
app:tabMode="auto"
|
||||||
app:tabTextAppearance="@style/customTabLayout"
|
app:tabTextAppearance="@style/customTabLayout"
|
||||||
app:tabMode="scrollable"
|
|
||||||
app:tabTextColor="?attr/primaryTextColor"
|
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
app:tabIndicatorColor="?attr/pagerTabIndicatorColor"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content" />
|
android:background="?attr/primaryBackgroundColor"
|
||||||
|
app:tabTextColor="?attr/primaryTextColor"
|
||||||
|
app:tabIndicatorColor="?attr/pagerTabIndicatorColor"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:id="@+id/tabExploreRepositories"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pageTitleRepositories" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:id="@+id/tabExploreIssues"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pageTitleIssues" />
|
||||||
|
|
||||||
|
<com.google.android.material.tabs.TabItem
|
||||||
|
android:id="@+id/tabExplorePublicOrganizations"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/pageTitleOrganizations" />
|
||||||
|
|
||||||
|
</com.google.android.material.tabs.TabLayout>
|
||||||
|
|
||||||
</com.google.android.material.appbar.AppBarLayout>
|
</com.google.android.material.appbar.AppBarLayout>
|
||||||
|
|
||||||
<androidx.viewpager2.widget.ViewPager2
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/containerExplore"
|
android:id="@+id/containerExplore"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
@ -6,6 +6,15 @@
|
|||||||
android:background="?attr/primaryBackgroundColor"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/loadingMoreView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,81 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
||||||
android:id="@+id/progressBar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:indeterminate="true"
|
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="10dp"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:layout_marginBottom="10dp">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/searchKeywordLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
app:boxBackgroundColor="?attr/inputBackgroundColor"
|
|
||||||
android:textColorHint="?attr/hintColor"
|
|
||||||
app:hintTextColor="?attr/hintColor"
|
|
||||||
app:boxStrokeErrorColor="@color/darkRed"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
app:startIconDrawable="@drawable/ic_search"
|
|
||||||
app:startIconTint="?attr/iconsColor"
|
|
||||||
app:endIconMode="clear_text"
|
|
||||||
app:endIconTint="?attr/iconsColor"
|
|
||||||
android:hint="@string/exploreUsers">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/searchKeyword"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColor="?attr/inputTextColor"
|
|
||||||
android:textColorHighlight="?attr/hintColor"
|
|
||||||
android:textColorHint="?attr/hintColor"
|
|
||||||
android:imeOptions="actionSend"
|
|
||||||
android:inputType="text"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/noData"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_margin="15dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/noDataFound"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="20sp"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
||||||
android:id="@+id/pullToRefresh"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/recyclerViewExploreUsers"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
android:scrollbars="vertical" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -21,13 +21,22 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/progressLoadMore"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noDataIssues"
|
android:id="@+id/noDataIssues"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
|
@ -16,12 +16,19 @@
|
|||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/notifications"
|
android:id="@+id/notifications"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent" />
|
||||||
android:background="?attr/primaryBackgroundColor"
|
|
||||||
android:scrollbars="vertical" />
|
|
||||||
|
|
||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/loadingMoreView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -66,7 +66,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/websiteText"
|
android:contentDescription="@string/websiteText"
|
||||||
@ -109,7 +108,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/locationText"
|
android:contentDescription="@string/locationText"
|
||||||
|
@ -20,13 +20,22 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/progressLoadMore"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noDataOrg"
|
android:id="@+id/noDataOrg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -1,23 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
<LinearLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:background="?attr/primaryBackgroundColor"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.google.android.material.appbar.AppBarLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/profileFrame"
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:theme="@style/AppTheme.AppBarOverlay"
|
|
||||||
app:elevation="0dp">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="200dp"
|
||||||
app:layout_scrollFlags="scroll|exitUntilCollapsed">
|
android:gravity="top"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/userAvatarBackground"
|
android:id="@+id/userAvatarBackground"
|
||||||
@ -93,7 +89,14 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</FrameLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.appbar.AppBarLayout
|
||||||
|
android:id="@+id/appbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:theme="@style/AppTheme.AppBarOverlay"
|
||||||
|
app:elevation="0dp">
|
||||||
|
|
||||||
<com.google.android.material.tabs.TabLayout
|
<com.google.android.material.tabs.TabLayout
|
||||||
android:id="@+id/tabs"
|
android:id="@+id/tabs"
|
||||||
@ -133,4 +136,4 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</LinearLayout>
|
||||||
|
@ -13,14 +13,6 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
||||||
android:id="@+id/progressBar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:indeterminate="true"
|
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/profileFrame"
|
android:id="@+id/profileFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -87,7 +79,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
@ -127,7 +118,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
@ -167,7 +157,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/generalImgContentText"
|
android:contentDescription="@string/generalImgContentText"
|
||||||
|
@ -26,6 +26,15 @@
|
|||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/progressLoadMore"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noData"
|
android:id="@+id/noData"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -21,13 +21,22 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/progressLoadMore"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noData"
|
android:id="@+id/noData"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -215,7 +215,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/repoWatchersInMenu"
|
android:contentDescription="@string/repoWatchersInMenu"
|
||||||
@ -256,7 +255,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/infoTabRepoCreatedAt"
|
android:contentDescription="@string/infoTabRepoCreatedAt"
|
||||||
@ -297,7 +295,6 @@
|
|||||||
android:paddingRight="15dp">
|
android:paddingRight="15dp">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:contentDescription="@string/websiteText"
|
android:contentDescription="@string/websiteText"
|
||||||
|
@ -22,13 +22,22 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
app:indicatorColor="?attr/progressIndicatorColor" />
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/progressLoadMore"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/noData"
|
android:id="@+id/noData"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -6,6 +6,15 @@
|
|||||||
android:background="?attr/primaryBackgroundColor"
|
android:background="?attr/primaryBackgroundColor"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
|
android:id="@+id/loadingMoreView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:indeterminate="true"
|
||||||
|
style="@style/Widget.MaterialComponents.LinearProgressIndicator"
|
||||||
|
app:indicatorColor="?attr/progressIndicatorColor" />
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@ -36,7 +45,7 @@
|
|||||||
app:startIconTint="?attr/iconsColor"
|
app:startIconTint="?attr/iconsColor"
|
||||||
app:endIconMode="clear_text"
|
app:endIconMode="clear_text"
|
||||||
app:endIconTint="?attr/iconsColor"
|
app:endIconTint="?attr/iconsColor"
|
||||||
android:hint="@string/exploreIssues">
|
android:hint="@string/navSearchIssuesPulls">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/searchKeyword"
|
android:id="@+id/searchKeyword"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||||
|
|
||||||
<com.google.android.material.progressindicator.LinearProgressIndicator
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progress_bar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:indeterminate="true"
|
android:indeterminate="true"
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
android:paddingRight="8dp"
|
android:paddingRight="8dp"
|
||||||
android:paddingBottom="3dp"
|
android:paddingBottom="3dp"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="14sp"
|
android:textSize="15sp"
|
||||||
tools:text="👍" />
|
tools:text="👍" />
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="18sp"
|
android:textSize="20sp"
|
||||||
tools:text="👍" />
|
tools:text="👍" />
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:padding="16dp">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/userAvatar"
|
|
||||||
android:layout_width="@dimen/list_avatar_size"
|
|
||||||
android:layout_height="@dimen/list_avatar_size"
|
|
||||||
android:layout_marginEnd="10dp"
|
|
||||||
android:contentDescription="@string/generalImgContentText"
|
|
||||||
android:src="@drawable/ic_android" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/userInfoSection"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/userFullName"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/userName"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="16sp"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/userName"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="@string/userName"
|
|
||||||
android:textColor="?attr/primaryTextColor"
|
|
||||||
android:textSize="14sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
@ -13,6 +13,7 @@
|
|||||||
android:id="@+id/orgInfoFrame"
|
android:id="@+id/orgInfoFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
tools:ignore="UseCompoundDrawables">
|
tools:ignore="UseCompoundDrawables">
|
||||||
@ -42,8 +43,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/noDataDescription"
|
android:text="@string/noDataDescription"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -61,15 +61,8 @@
|
|||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
android:textColor="?attr/primaryTextColor"
|
android:textColor="?attr/primaryTextColor"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:visibility="gone"
|
|
||||||
android:text="@string/noDataDescription" />
|
android:text="@string/noDataDescription" />
|
||||||
|
|
||||||
<View
|
|
||||||
android:id="@+id/spacerView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginBottom="8dp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/repoInfoFrame"
|
android:id="@+id/repoInfoFrame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
|
|
||||||
<item android:id="@+id/nav_explore"
|
<item android:id="@+id/nav_explore"
|
||||||
android:icon="@drawable/ic_search"
|
android:icon="@drawable/ic_search"
|
||||||
android:title="@string/pageTitleExplore" />
|
android:title="@string/navExplore" />
|
||||||
|
|
||||||
<item android:id="@+id/nav_comments_draft"
|
<item android:id="@+id/nav_comments_draft"
|
||||||
android:icon="@drawable/ic_drafts"
|
android:icon="@drawable/ic_drafts"
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">عن التطبيق</string>
|
<string name="navAbout">عن التطبيق</string>
|
||||||
<string name="navRate">GitNex معدل</string>
|
<string name="navRate">GitNex معدل</string>
|
||||||
<string name="navLogout">الخروج</string>
|
<string name="navLogout">الخروج</string>
|
||||||
|
<string name="navExplore">استكشف</string>
|
||||||
<string name="navAdministration">Administration</string>
|
<string name="navAdministration">Administration</string>
|
||||||
|
<string name="navSearchIssuesPulls">Search Issues</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">عن التطبيق</string>
|
<string name="pageTitleAbout">عن التطبيق</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Gitea Administration</string>
|
<string name="pageTitleAdministration">Gitea Administration</string>
|
||||||
<string name="pageTitleUserAccounts">Manage Accounts</string>
|
<string name="pageTitleUserAccounts">Manage Accounts</string>
|
||||||
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Demo repo</string>
|
<string name="repoName">Demo repo</string>
|
||||||
<string name="repoFullName">Repo with ORG</string>
|
<string name="repoFullName">Repo with ORG</string>
|
||||||
@ -154,7 +155,6 @@
|
|||||||
<string name="milestoneNoDescription">No description</string>
|
<string name="milestoneNoDescription">No description</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Select Labels</string>
|
<string name="newIssueSelectLabelsListTitle">Select Labels</string>
|
||||||
<string name="newIssueTitle">العنوان</string>
|
<string name="newIssueTitle">العنوان</string>
|
||||||
@ -431,10 +431,7 @@
|
|||||||
<string name="isClosed">Closed</string>
|
<string name="isClosed">Closed</string>
|
||||||
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<string name="genericCopyUrl">Copy URL</string>
|
<string name="genericCopyUrl">Copy URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Explore repositories</string>
|
<string name="exploreTextBoxHint">Explore repositories</string>
|
||||||
<string name="starRepository">Star Repository</string>
|
<string name="starRepository">Star Repository</string>
|
||||||
<string name="unStarRepository">Unstar Repository</string>
|
<string name="unStarRepository">Unstar Repository</string>
|
||||||
@ -445,7 +442,7 @@
|
|||||||
<string name="watchRepositorySuccess">تمت إضافة المستودع إلى قائمة المراقبة</string>
|
<string name="watchRepositorySuccess">تمت إضافة المستودع إلى قائمة المراقبة</string>
|
||||||
<string name="unWatchRepositorySuccess">تمت إزالة المستودع مِن قائمة المراقبة</string>
|
<string name="unWatchRepositorySuccess">تمت إزالة المستودع مِن قائمة المراقبة</string>
|
||||||
<string name="titleDrafts">Drafts</string>
|
<string name="titleDrafts">Drafts</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
||||||
<string name="versionUnknown">No Gitea detected!</string>
|
<string name="versionUnknown">No Gitea detected!</string>
|
||||||
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
||||||
@ -463,7 +460,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
||||||
<string name="openFileDiffText">Files Changed</string>
|
<string name="openFileDiffText">Files Changed</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Merge Pull Request</string>
|
<string name="mergePullRequestText">Merge Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -554,7 +550,7 @@
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notifications</string>
|
<string name="pageTitleNotifications">Notifications</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">No notifications found</string>
|
||||||
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minutes</string>
|
<string name="pollingDelaySelectedText">%d Minutes</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
||||||
@ -635,15 +631,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">O aplikaci</string>
|
<string name="navAbout">O aplikaci</string>
|
||||||
<string name="navRate">Ohodnotit GitNex</string>
|
<string name="navRate">Ohodnotit GitNex</string>
|
||||||
<string name="navLogout">Odhlásit se</string>
|
<string name="navLogout">Odhlásit se</string>
|
||||||
|
<string name="navExplore">Prozkoumat</string>
|
||||||
<string name="navAdministration">Administrace</string>
|
<string name="navAdministration">Administrace</string>
|
||||||
|
<string name="navSearchIssuesPulls">Search Issues</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">O aplikaci</string>
|
<string name="pageTitleAbout">O aplikaci</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Administrace Gitea</string>
|
<string name="pageTitleAdministration">Administrace Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">Správa účtů</string>
|
<string name="pageTitleUserAccounts">Správa účtů</string>
|
||||||
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Demo repozitář</string>
|
<string name="repoName">Demo repozitář</string>
|
||||||
<string name="repoFullName">Repo with ORG</string>
|
<string name="repoFullName">Repo with ORG</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">Bez popisu</string>
|
<string name="milestoneNoDescription">Bez popisu</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d otevřených</string>
|
<string name="milestoneIssueStatusOpen">%1$d otevřených</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d zavřených</string>
|
<string name="milestoneIssueStatusClosed">%1$d zavřených</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Vybrat pověřenou osobu</string>
|
<string name="newIssueSelectAssigneesListTitle">Vybrat pověřenou osobu</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Vybrat popisek</string>
|
<string name="newIssueSelectLabelsListTitle">Vybrat popisek</string>
|
||||||
<string name="newIssueTitle">Název</string>
|
<string name="newIssueTitle">Název</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Closed</string>
|
<string name="isClosed">Closed</string>
|
||||||
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<string name="genericCopyUrl">Copy URL</string>
|
<string name="genericCopyUrl">Copy URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Explore repositories</string>
|
<string name="exploreTextBoxHint">Explore repositories</string>
|
||||||
<string name="starRepository">Star Repository</string>
|
<string name="starRepository">Star Repository</string>
|
||||||
<string name="unStarRepository">Unstar Repository</string>
|
<string name="unStarRepository">Unstar Repository</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
||||||
<string name="titleDrafts">Drafts</string>
|
<string name="titleDrafts">Drafts</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
||||||
<string name="versionUnknown">No Gitea detected!</string>
|
<string name="versionUnknown">No Gitea detected!</string>
|
||||||
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
||||||
<string name="openFileDiffText">Files Changed</string>
|
<string name="openFileDiffText">Files Changed</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Merge Pull Request</string>
|
<string name="mergePullRequestText">Merge Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notifications</string>
|
<string name="pageTitleNotifications">Notifications</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">No notifications found</string>
|
||||||
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minutes</string>
|
<string name="pollingDelaySelectedText">%d Minutes</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">Über</string>
|
<string name="navAbout">Über</string>
|
||||||
<string name="navRate">Bewerte GitNex</string>
|
<string name="navRate">Bewerte GitNex</string>
|
||||||
<string name="navLogout">Ausloggen</string>
|
<string name="navLogout">Ausloggen</string>
|
||||||
|
<string name="navExplore">Erkunden</string>
|
||||||
<string name="navAdministration">Administration</string>
|
<string name="navAdministration">Administration</string>
|
||||||
|
<string name="navSearchIssuesPulls">Issues Suche</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">Über</string>
|
<string name="pageTitleAbout">Über</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Gitea-Administration</string>
|
<string name="pageTitleAdministration">Gitea-Administration</string>
|
||||||
<string name="pageTitleUserAccounts">Konten verwalten</string>
|
<string name="pageTitleUserAccounts">Konten verwalten</string>
|
||||||
<string name="pageTitleNewPullRequest">Neuer Pull-Request</string>
|
<string name="pageTitleNewPullRequest">Neuer Pull-Request</string>
|
||||||
<string name="pageTitleUsers">Benutzer</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Demo Repo</string>
|
<string name="repoName">Demo Repo</string>
|
||||||
<string name="repoFullName">Repo mit ORG</string>
|
<string name="repoFullName">Repo mit ORG</string>
|
||||||
@ -110,10 +111,10 @@
|
|||||||
<string name="tabPullRequests">Pull Requests</string>
|
<string name="tabPullRequests">Pull Requests</string>
|
||||||
<string name="noDataIssueTab">Keine Issues gefunden!</string>
|
<string name="noDataIssueTab">Keine Issues gefunden!</string>
|
||||||
<string name="infoTabRepoSize">Größe</string>
|
<string name="infoTabRepoSize">Größe</string>
|
||||||
<string name="infoTabRepoDefaultBranch">Standard-Branch</string>
|
<string name="infoTabRepoDefaultBranch">Standard Branch</string>
|
||||||
<string name="infoTabRepoSshUrl">SSH-URL</string>
|
<string name="infoTabRepoSshUrl">SSH Link</string>
|
||||||
<string name="infoTabRepoCloneUrl">Klon-URL</string>
|
<string name="infoTabRepoCloneUrl">Klon-URL</string>
|
||||||
<string name="infoTabRepoRepoUrl">Repo-URL</string>
|
<string name="infoTabRepoRepoUrl">Repository Link</string>
|
||||||
<string name="infoTabRepoForksCount">Anzahl an Forks</string>
|
<string name="infoTabRepoForksCount">Anzahl an Forks</string>
|
||||||
<string name="infoTabRepoCreatedAt">Erstellt</string>
|
<string name="infoTabRepoCreatedAt">Erstellt</string>
|
||||||
<string name="infoTabRepoUpdatedAt">Letzte Aktualisierung</string>
|
<string name="infoTabRepoUpdatedAt">Letzte Aktualisierung</string>
|
||||||
@ -138,7 +139,7 @@
|
|||||||
<string name="noDataReleasesTab">Kein Release gefunden!</string>
|
<string name="noDataReleasesTab">Kein Release gefunden!</string>
|
||||||
<string name="releasePublishedBy">Veröffentlicht von @%1$s</string>
|
<string name="releasePublishedBy">Veröffentlicht von @%1$s</string>
|
||||||
<string name="noReleaseBodyContent">Veröffentlichungshinweise werden vom Herausgeber nicht zur Verfügung gestellt.</string>
|
<string name="noReleaseBodyContent">Veröffentlichungshinweise werden vom Herausgeber nicht zur Verfügung gestellt.</string>
|
||||||
<string name="noDataCollaboratorTab">Keine Mitarbeiter gefunden</string>
|
<string name="noDataCollaboratorTab">Kein Zuständiger gefunden!</string>
|
||||||
<string name="newMilestoneTitle">Titel</string>
|
<string name="newMilestoneTitle">Titel</string>
|
||||||
<string name="newMilestoneDescription">Beschreibung</string>
|
<string name="newMilestoneDescription">Beschreibung</string>
|
||||||
<string name="newMilestoneDueDate">Fälligkeitsdatum</string>
|
<string name="newMilestoneDueDate">Fälligkeitsdatum</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">Keine Beschreibung</string>
|
<string name="milestoneNoDescription">Keine Beschreibung</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d offen</string>
|
<string name="milestoneIssueStatusOpen">%1$d offen</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d geschlossen</string>
|
<string name="milestoneIssueStatusClosed">%1$d geschlossen</string>
|
||||||
<string name="selectMilestone">Meilensteine auswählen</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Wählen Sie Zuständige aus</string>
|
<string name="newIssueSelectAssigneesListTitle">Wählen Sie Zuständige aus</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Label auswählen</string>
|
<string name="newIssueSelectLabelsListTitle">Label auswählen</string>
|
||||||
<string name="newIssueTitle">Titel</string>
|
<string name="newIssueTitle">Titel</string>
|
||||||
@ -197,10 +197,10 @@
|
|||||||
<string name="themeSelectionHeaderText">Design</string>
|
<string name="themeSelectionHeaderText">Design</string>
|
||||||
<string name="settingsCounterBadges">Zähler für Tabs</string>
|
<string name="settingsCounterBadges">Zähler für Tabs</string>
|
||||||
<string name="settingsFileViewerSourceCodeHeaderText">Quellcode-Design</string>
|
<string name="settingsFileViewerSourceCodeHeaderText">Quellcode-Design</string>
|
||||||
<string name="cacheSizeDataDialogHeader">Größe des Daten-Caches</string>
|
<string name="cacheSizeDataDialogHeader">Daten-Cache Größe</string>
|
||||||
<string name="cacheSizeDataSelectionHeaderText">Größe des Daten-Caches</string>
|
<string name="cacheSizeDataSelectionHeaderText">Daten-Cache Größe</string>
|
||||||
<string name="cacheSizeImagesDialogHeader">Größe des Bilder-Caches</string>
|
<string name="cacheSizeImagesDialogHeader">Bilder-Cache Größe</string>
|
||||||
<string name="cacheSizeImagesSelectionHeaderText">Größe des Bilder-Caches</string>
|
<string name="cacheSizeImagesSelectionHeaderText">Bilder-Cache Größe</string>
|
||||||
<string name="clearCacheSelectionHeaderText">Cache löschen</string>
|
<string name="clearCacheSelectionHeaderText">Cache löschen</string>
|
||||||
<string name="clearCacheDialogHeader">Cache löschen?</string>
|
<string name="clearCacheDialogHeader">Cache löschen?</string>
|
||||||
<string name="clearCacheDialogMessage">Dadurch werden alle Cache-Daten einschließlich Dateien und Bilder gelöscht.\n\nMit dem Löschen fortfahren?</string>
|
<string name="clearCacheDialogMessage">Dadurch werden alle Cache-Daten einschließlich Dateien und Bilder gelöscht.\n\nMit dem Löschen fortfahren?</string>
|
||||||
@ -220,7 +220,7 @@
|
|||||||
<string name="createLabel">Label erstellen</string>
|
<string name="createLabel">Label erstellen</string>
|
||||||
<string name="menuTitleText">Repo-Menü</string>
|
<string name="menuTitleText">Repo-Menü</string>
|
||||||
<string name="labelName">Beschriftung</string>
|
<string name="labelName">Beschriftung</string>
|
||||||
<string name="labelColor">Farbe des Labels</string>
|
<string name="labelColor">Label Farbe</string>
|
||||||
<string name="labelEmptyError">Name des Namens ist leer.</string>
|
<string name="labelEmptyError">Name des Namens ist leer.</string>
|
||||||
<string name="labelNameError">Label Name ist ungültig.</string>
|
<string name="labelNameError">Label Name ist ungültig.</string>
|
||||||
<string name="labelCreated">Label wurde erfolgreich erstellt!</string>
|
<string name="labelCreated">Label wurde erfolgreich erstellt!</string>
|
||||||
@ -268,7 +268,7 @@
|
|||||||
<string name="newTeamDesc">Beschreibung des Teams</string>
|
<string name="newTeamDesc">Beschreibung des Teams</string>
|
||||||
<string name="newTeamPermission">Berechtigung</string>
|
<string name="newTeamPermission">Berechtigung</string>
|
||||||
<string name="newTeamAccessControls">Zugriffsrechte</string>
|
<string name="newTeamAccessControls">Zugriffsrechte</string>
|
||||||
<string name="newTeamPermissionRead">Mitglieder können Team-Repositorys einsehen und klonen</string>
|
<string name="newTeamPermissionRead">Mitglieder können Team Repositorys einsehen und klonen.</string>
|
||||||
<string name="newTeamPermissionWrite">Mitglieder können auf Team-Repositories lesen und schreiben.</string>
|
<string name="newTeamPermissionWrite">Mitglieder können auf Team-Repositories lesen und schreiben.</string>
|
||||||
<string name="newTeamPermissionAdmin">Mitglieder können auf Team-Repositories lesen, schreiben und Teilnehmer hinzufügen.</string>
|
<string name="newTeamPermissionAdmin">Mitglieder können auf Team-Repositories lesen, schreiben und Teilnehmer hinzufügen.</string>
|
||||||
<string name="teamNameEmpty">Bitte geben Sie den Teamnamen ein.</string>
|
<string name="teamNameEmpty">Bitte geben Sie den Teamnamen ein.</string>
|
||||||
@ -326,7 +326,7 @@
|
|||||||
<!-- admin -->
|
<!-- admin -->
|
||||||
<string name="adminCreateNewUser">Neuen Benutzer erstellen</string>
|
<string name="adminCreateNewUser">Neuen Benutzer erstellen</string>
|
||||||
<string name="adminUsers">Systembenutzer</string>
|
<string name="adminUsers">Systembenutzer</string>
|
||||||
<string name="userRoleAdmin">Admin</string>
|
<string name="userRoleAdmin">Administrator</string>
|
||||||
<string name="adminCron">Cron-Jobs</string>
|
<string name="adminCron">Cron-Jobs</string>
|
||||||
<string name="adminCronScheduleHeader">Termin planen</string>
|
<string name="adminCronScheduleHeader">Termin planen</string>
|
||||||
<string name="adminCronNextRunHeader">Nächster Durchlauf</string>
|
<string name="adminCronNextRunHeader">Nächster Durchlauf</string>
|
||||||
@ -365,7 +365,7 @@
|
|||||||
<string name="loginOTP">OTP-Code (optional)</string>
|
<string name="loginOTP">OTP-Code (optional)</string>
|
||||||
<string name="otpMessage">Gib den Otp-Code ein, wenn 2FA eingeschaltet ist</string>
|
<string name="otpMessage">Gib den Otp-Code ein, wenn 2FA eingeschaltet ist</string>
|
||||||
<string name="openWebRepo">Öffne mit Browser</string>
|
<string name="openWebRepo">Öffne mit Browser</string>
|
||||||
<string name="repoStargazersInMenu">Favorisiert von</string>
|
<string name="repoStargazersInMenu">Favorisierer</string>
|
||||||
<string name="repoWatchersInMenu">Beobachter</string>
|
<string name="repoWatchersInMenu">Beobachter</string>
|
||||||
<string name="noDataWebsite">Keine Webseite gefunden</string>
|
<string name="noDataWebsite">Keine Webseite gefunden</string>
|
||||||
<string name="noDataDescription">Keine Beschreibung gefunden</string>
|
<string name="noDataDescription">Keine Beschreibung gefunden</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Geschlossen</string>
|
<string name="isClosed">Geschlossen</string>
|
||||||
<string name="genericServerResponseError">Wir können den Server im Moment nicht erreichen. Bitte überprüfen Sie Ihren Serverstatus und versuchen Sie es erneut</string>
|
<string name="genericServerResponseError">Wir können den Server im Moment nicht erreichen. Bitte überprüfen Sie Ihren Serverstatus und versuchen Sie es erneut</string>
|
||||||
<string name="genericCopyUrl">Link kopieren</string>
|
<string name="genericCopyUrl">Link kopieren</string>
|
||||||
<string name="genericWaitFor">Laden ... ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Benutzer erkunden</string>
|
|
||||||
<string name="exploreIssues">Issues erkunden</string>
|
|
||||||
<string name="exploreTextBoxHint">Repositories entdecken</string>
|
<string name="exploreTextBoxHint">Repositories entdecken</string>
|
||||||
<string name="starRepository">Repository favorisieren</string>
|
<string name="starRepository">Repository favorisieren</string>
|
||||||
<string name="unStarRepository">Repository nicht mehr favorisieren</string>
|
<string name="unStarRepository">Repository nicht mehr favorisieren</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repository zur Merkliste hinzugefügt</string>
|
<string name="watchRepositorySuccess">Repository zur Merkliste hinzugefügt</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository von der Merkliste entfernt</string>
|
<string name="unWatchRepositorySuccess">Repository von der Merkliste entfernt</string>
|
||||||
<string name="titleDrafts">Entwürfe</string>
|
<string name="titleDrafts">Entwürfe</string>
|
||||||
<string name="versionUnsupportedOld">Nicht unterstützte alte Version(%1$s) von Gitea erkannt. Bitte aktualisieren Sie auf die neueste stabile Version. Wenn Sie fortfahren, funktioniert die App möglicherweise nicht ordnungsgemäß.</string>
|
<string name="versionUnsupportedOld">Nicht unterstützte alte Version(%1$s) von Gitea erkannt. Bitte aktualisieren Sie auf die neueste stabile Version. Wenn Sie fortfahren, funktioniert die App möglicherweise nicht ordnungsgemäß</string>
|
||||||
<string name="versionUnsupportedNew">Neue Gitea-Version erkannt! Bitte UPDATE GitNex!</string>
|
<string name="versionUnsupportedNew">Neue Gitea-Version erkannt! Bitte UPDATE GitNex!</string>
|
||||||
<string name="versionUnknown">Keine Gitea erkannt!</string>
|
<string name="versionUnknown">Keine Gitea erkannt!</string>
|
||||||
<string name="versionAlertDialogHeader">Nicht unterstützte Version von Gitea</string>
|
<string name="versionAlertDialogHeader">Nicht unterstützte Version von Gitea</string>
|
||||||
@ -453,16 +450,15 @@
|
|||||||
<string name="prDeletedFork">Gelöschter Fork</string>
|
<string name="prDeletedFork">Gelöschter Fork</string>
|
||||||
<string name="noDataPullRequests">Keine Pull-Requests gefunden</string>
|
<string name="noDataPullRequests">Keine Pull-Requests gefunden</string>
|
||||||
<string name="prCreator">Ersteller:\u0020</string>
|
<string name="prCreator">Ersteller:\u0020</string>
|
||||||
<string name="editPrText">Pull-Request bearbeiten</string>
|
<string name="editPrText">Bearbeite Pull-Request</string>
|
||||||
<string name="copyPrUrlText">Pull-Request URL kopieren</string>
|
<string name="copyPrUrlText">Pull-Request URL kopieren</string>
|
||||||
<string name="editPrNavHeader">Bearbeite Pull-Request #%1$s</string>
|
<string name="editPrNavHeader">Bearbeite Pull-Request #%1$s</string>
|
||||||
<string name="editPrSuccessMessage">Pull-Request aktualisiert</string>
|
<string name="editPrSuccessMessage">Pull-Request aktualisiert</string>
|
||||||
<string name="fileDiffViewHeader">%1$s Dateien geändert</string>
|
<string name="fileDiffViewHeader">%1$s Dateien geändert</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s Dateien geändert</string>
|
<string name="fileDiffViewHeaderSingle">%1$s Dateien geändert</string>
|
||||||
<string name="openFileDiffText">Diff anzeigen</string>
|
<string name="openFileDiffText">Diff Anzeigen</string>
|
||||||
<string name="updatePullRequestText">Pull Request aktualisieren</string>
|
|
||||||
<string name="mergePullRequestText">Pull-Request zusammenführen</string>
|
<string name="mergePullRequestText">Pull-Request zusammenführen</string>
|
||||||
<string name="deletePrHeadBranch">Quell-Branch löschen</string>
|
<string name="deletePrHeadBranch">Ziel-Branch löschen</string>
|
||||||
<string name="deleteBranchSuccess">Branch erfolgreich gelöscht</string>
|
<string name="deleteBranchSuccess">Branch erfolgreich gelöscht</string>
|
||||||
<string name="deleteBranchError">Branch konnte nicht gelöscht werden</string>
|
<string name="deleteBranchError">Branch konnte nicht gelöscht werden</string>
|
||||||
<string name="deleteBranchErrorNotFound">Branch existiert nicht</string>
|
<string name="deleteBranchErrorNotFound">Branch existiert nicht</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Auf Konto umgeschaltet: %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Auf Konto umgeschaltet: %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Benachrichtigungen</string>
|
<string name="pageTitleNotifications">Benachrichtigungen</string>
|
||||||
<string name="noDataNotifications">Keine Nachrichten 🚀</string>
|
<string name="noDataNotifications">Keine Benachrichtigungen gefunden</string>
|
||||||
<string name="notificationsPollingHeaderText">Benachrichtigungsverzögerung</string>
|
<string name="notificationsPollingHeaderText">Benachrichtigungsverzögerung</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minuten</string>
|
<string name="pollingDelaySelectedText">%d Minuten</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Abfrageverzögerung auswählen</string>
|
<string name="pollingDelayDialogHeaderText">Abfrageverzögerung auswählen</string>
|
||||||
@ -592,7 +588,7 @@
|
|||||||
<string name="repoDeletionSuccess">Repository erfolgreich gelöscht</string>
|
<string name="repoDeletionSuccess">Repository erfolgreich gelöscht</string>
|
||||||
<string name="repoSettingsTransferOwnership">Besitz übertragen</string>
|
<string name="repoSettingsTransferOwnership">Besitz übertragen</string>
|
||||||
<string name="repoSettingsTransferOwnershipHint">Dieses Repository an einen Benutzer oder eine Organisation übertragen, für die Sie Admin Rechte haben</string>
|
<string name="repoSettingsTransferOwnershipHint">Dieses Repository an einen Benutzer oder eine Organisation übertragen, für die Sie Admin Rechte haben</string>
|
||||||
<string name="repoSettingsTransferOwnershipDescription">Dinge, die vor der Übertragung bekannt sein sollten:\n\n- Du verlierst den Zugriff auf das Projekt, wenn es an einen Benutzer übertragen wird.\n- Du behälst den Zugriff auf das Projekt, wenn es an eine Organisation übertragen wird, die du (mit-)besitzt.\n\nGib den Repository-Namen als Bestätigung ein</string>
|
<string name="repoSettingsTransferOwnershipDescription">Dinge, die vor der Übertragung bekannt sind:\n\n- Du verlierst den Zugriff auf das Projekt, wenn es an einen Benutzer übertragen wird.\n- Du behälst den Zugriff auf das Projekt, wenn es an eine Organisation übertragen wird, die du (mit-)besitzt.\n\nGeben den Repository-Namen als Bestätigung ein</string>
|
||||||
<string name="repoTransferText">Übertragung durchführen</string>
|
<string name="repoTransferText">Übertragung durchführen</string>
|
||||||
<string name="repoTransferOwnerText">Neuer Besitzer</string>
|
<string name="repoTransferOwnerText">Neuer Besitzer</string>
|
||||||
<string name="repoTransferSuccess">Repository erfolgreich übertragen</string>
|
<string name="repoTransferSuccess">Repository erfolgreich übertragen</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Zeigt den Fortschritt laufender Downloads an</string>
|
<string name="fileViewerNotificationChannelDescription">Zeigt den Fortschritt laufender Downloads an</string>
|
||||||
<string name="lastUpdatedAt">Aktualisiert %s</string>
|
<string name="lastUpdatedAt">Aktualisiert %s</string>
|
||||||
<string name="joined">Beigetreten</string>
|
<string name="joined">Beigetreten</string>
|
||||||
<string name="userFollow">Folgen</string>
|
|
||||||
<string name="unfollowUser">Nicht mehr folgen</string>
|
|
||||||
<string name="unfollowedUser">Du folgst @%s nicht mehr</string>
|
|
||||||
<string name="nowFollowUser">Du folgst @%s</string>
|
|
||||||
<string name="unfollowingFailed">Benutzer konnte nicht entfolgt werden</string>
|
|
||||||
<string name="followingFailed">Nutzer konnte nicht gefolgt werden</string>
|
|
||||||
<string name="updatePrConflict">Der Pull Request enthält Konflikte. Bitte behebe diese und versuche es erneut.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request erfolgreich aktualisiert</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Update-Strategie auswählen</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">Sobre</string>
|
<string name="navAbout">Sobre</string>
|
||||||
<string name="navRate">Valorar GitNex</string>
|
<string name="navRate">Valorar GitNex</string>
|
||||||
<string name="navLogout">Cerrar sesión</string>
|
<string name="navLogout">Cerrar sesión</string>
|
||||||
|
<string name="navExplore">Explorar</string>
|
||||||
<string name="navAdministration">Administración</string>
|
<string name="navAdministration">Administración</string>
|
||||||
|
<string name="navSearchIssuesPulls">Buscar incidencias</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">Sobre</string>
|
<string name="pageTitleAbout">Sobre</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Administración de Gitea</string>
|
<string name="pageTitleAdministration">Administración de Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">Gestionar Cuentas</string>
|
<string name="pageTitleUserAccounts">Gestionar Cuentas</string>
|
||||||
<string name="pageTitleNewPullRequest">Nuevo pull request</string>
|
<string name="pageTitleNewPullRequest">Nuevo pull request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Repo Demo</string>
|
<string name="repoName">Repo Demo</string>
|
||||||
<string name="repoFullName">Repo con ORG</string>
|
<string name="repoFullName">Repo con ORG</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">Sin descripción</string>
|
<string name="milestoneNoDescription">Sin descripción</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d abiertos</string>
|
<string name="milestoneIssueStatusOpen">%1$d abiertos</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d cerrados</string>
|
<string name="milestoneIssueStatusClosed">%1$d cerrados</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Selecciona personas asignadas</string>
|
<string name="newIssueSelectAssigneesListTitle">Selecciona personas asignadas</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Selecciona etiquetas</string>
|
<string name="newIssueSelectLabelsListTitle">Selecciona etiquetas</string>
|
||||||
<string name="newIssueTitle">Título</string>
|
<string name="newIssueTitle">Título</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Cerrado</string>
|
<string name="isClosed">Cerrado</string>
|
||||||
<string name="genericServerResponseError">Por el momento no se puede contactar con el servidor. Por favor, compruebe el statús del servidor y intentalo de nuevo</string>
|
<string name="genericServerResponseError">Por el momento no se puede contactar con el servidor. Por favor, compruebe el statús del servidor y intentalo de nuevo</string>
|
||||||
<string name="genericCopyUrl">Copiar URL</string>
|
<string name="genericCopyUrl">Copiar URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Explorar repositorios</string>
|
<string name="exploreTextBoxHint">Explorar repositorios</string>
|
||||||
<string name="starRepository">Destacar repositorio</string>
|
<string name="starRepository">Destacar repositorio</string>
|
||||||
<string name="unStarRepository">Eliminar de favoritos</string>
|
<string name="unStarRepository">Eliminar de favoritos</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Añadido a la lista de los repositorios seguidos</string>
|
<string name="watchRepositorySuccess">Añadido a la lista de los repositorios seguidos</string>
|
||||||
<string name="unWatchRepositorySuccess">Eliminado de la lista de los repositorios seguidos</string>
|
<string name="unWatchRepositorySuccess">Eliminado de la lista de los repositorios seguidos</string>
|
||||||
<string name="titleDrafts">Borradores</string>
|
<string name="titleDrafts">Borradores</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Se ha reconocido una versión (%1$s) de Gitea no compatible. Por favor actualice su instancia a la versión más reciente. Si usted continua, es posible que la app no funcione correctamente</string>
|
||||||
<string name="versionUnsupportedNew">Se ha reconocido una nueva version de Gitea! Por favor, ACTUALICE GitNex!</string>
|
<string name="versionUnsupportedNew">Se ha reconocido una nueva version de Gitea! Por favor, ACTUALICE GitNex!</string>
|
||||||
<string name="versionUnknown">Gitea no reconocida!</string>
|
<string name="versionUnknown">Gitea no reconocida!</string>
|
||||||
<string name="versionAlertDialogHeader">Versión de Gitea no compatible</string>
|
<string name="versionAlertDialogHeader">Versión de Gitea no compatible</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s archivos modificados</string>
|
<string name="fileDiffViewHeader">%1$s archivos modificados</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s archivo modificado</string>
|
<string name="fileDiffViewHeaderSingle">%1$s archivo modificado</string>
|
||||||
<string name="openFileDiffText">Archivos modificados</string>
|
<string name="openFileDiffText">Archivos modificados</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Fusionar pull request</string>
|
<string name="mergePullRequestText">Fusionar pull request</string>
|
||||||
<string name="deletePrHeadBranch">Eliminar la rama principal</string>
|
<string name="deletePrHeadBranch">Eliminar la rama principal</string>
|
||||||
<string name="deleteBranchSuccess">Rama eliminada con éxito</string>
|
<string name="deleteBranchSuccess">Rama eliminada con éxito</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Cambio de la cuenta: %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Cambio de la cuenta: %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notificaciones</string>
|
<string name="pageTitleNotifications">Notificaciones</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">No se han encontrado notificaciones</string>
|
||||||
<string name="notificationsPollingHeaderText">Retraso de notificaciones</string>
|
<string name="notificationsPollingHeaderText">Retraso de notificaciones</string>
|
||||||
<string name="pollingDelaySelectedText">%d minutos</string>
|
<string name="pollingDelaySelectedText">%d minutos</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Seleccionar cantidad del retraso</string>
|
<string name="pollingDelayDialogHeaderText">Seleccionar cantidad del retraso</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indica el progreso de las descargas en curso</string>
|
<string name="fileViewerNotificationChannelDescription">Indica el progreso de las descargas en curso</string>
|
||||||
<string name="lastUpdatedAt">Actualizado %s</string>
|
<string name="lastUpdatedAt">Actualizado %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">درباره ما</string>
|
<string name="navAbout">درباره ما</string>
|
||||||
<string name="navRate">به GitNex امتیاز دهید</string>
|
<string name="navRate">به GitNex امتیاز دهید</string>
|
||||||
<string name="navLogout">خروج از حساب کاربری</string>
|
<string name="navLogout">خروج از حساب کاربری</string>
|
||||||
|
<string name="navExplore">گشتوگذار</string>
|
||||||
<string name="navAdministration">مدیریت</string>
|
<string name="navAdministration">مدیریت</string>
|
||||||
|
<string name="navSearchIssuesPulls">جستجوی مسائل</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">درباره ما</string>
|
<string name="pageTitleAbout">درباره ما</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">مدیریت Gitea</string>
|
<string name="pageTitleAdministration">مدیریت Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">مدیریت حسابها</string>
|
<string name="pageTitleUserAccounts">مدیریت حسابها</string>
|
||||||
<string name="pageTitleNewPullRequest">ایجاد درخواست ادغام جدید</string>
|
<string name="pageTitleNewPullRequest">ایجاد درخواست ادغام جدید</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">مخزن پیش نمایشی</string>
|
<string name="repoName">مخزن پیش نمایشی</string>
|
||||||
<string name="repoFullName">مخزن با ORG</string>
|
<string name="repoFullName">مخزن با ORG</string>
|
||||||
@ -154,7 +155,6 @@
|
|||||||
<string name="milestoneNoDescription">بدون توضیح</string>
|
<string name="milestoneNoDescription">بدون توضیح</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d باز</string>
|
<string name="milestoneIssueStatusOpen">%1$d باز</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d بسته شده</string>
|
<string name="milestoneIssueStatusClosed">%1$d بسته شده</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">برچسبها را انتخاب کنید</string>
|
<string name="newIssueSelectLabelsListTitle">برچسبها را انتخاب کنید</string>
|
||||||
<string name="newIssueTitle">عنوان</string>
|
<string name="newIssueTitle">عنوان</string>
|
||||||
@ -431,10 +431,7 @@
|
|||||||
<string name="isClosed">بسته</string>
|
<string name="isClosed">بسته</string>
|
||||||
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<string name="genericCopyUrl">روگیری نشانی</string>
|
<string name="genericCopyUrl">روگیری نشانی</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">کشف مخزنها</string>
|
<string name="exploreTextBoxHint">کشف مخزنها</string>
|
||||||
<string name="starRepository">Star Repository</string>
|
<string name="starRepository">Star Repository</string>
|
||||||
<string name="unStarRepository">Unstar Repository</string>
|
<string name="unStarRepository">Unstar Repository</string>
|
||||||
@ -445,7 +442,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
||||||
<string name="titleDrafts">پیش نویسها</string>
|
<string name="titleDrafts">پیش نویسها</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
||||||
<string name="versionUnknown">هیچ Gitea تشخیص داده نشد!</string>
|
<string name="versionUnknown">هیچ Gitea تشخیص داده نشد!</string>
|
||||||
<string name="versionAlertDialogHeader">نگارش پشتیبانی نشده Gitea</string>
|
<string name="versionAlertDialogHeader">نگارش پشتیبانی نشده Gitea</string>
|
||||||
@ -463,7 +460,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s پرونده تغییر یافت</string>
|
<string name="fileDiffViewHeader">%1$s پرونده تغییر یافت</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s پرونده تغییر یافت</string>
|
<string name="fileDiffViewHeaderSingle">%1$s پرونده تغییر یافت</string>
|
||||||
<string name="openFileDiffText">پروندههای تغییر یافته</string>
|
<string name="openFileDiffText">پروندههای تغییر یافته</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Merge Pull Request</string>
|
<string name="mergePullRequestText">Merge Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -554,7 +550,7 @@
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">آگاهیها</string>
|
<string name="pageTitleNotifications">آگاهیها</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">هیچ آگاهی یافت نشد</string>
|
||||||
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
||||||
<string name="pollingDelaySelectedText">%d دقیقه</string>
|
<string name="pollingDelaySelectedText">%d دقیقه</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
||||||
@ -635,15 +631,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">Tietoja</string>
|
<string name="navAbout">Tietoja</string>
|
||||||
<string name="navRate">Anna palautetta</string>
|
<string name="navRate">Anna palautetta</string>
|
||||||
<string name="navLogout">Kirjaudu ulos</string>
|
<string name="navLogout">Kirjaudu ulos</string>
|
||||||
|
<string name="navExplore">Explore</string>
|
||||||
<string name="navAdministration">Administration</string>
|
<string name="navAdministration">Administration</string>
|
||||||
|
<string name="navSearchIssuesPulls">Search Issues</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">Tietoja</string>
|
<string name="pageTitleAbout">Tietoja</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Gitea Administration</string>
|
<string name="pageTitleAdministration">Gitea Administration</string>
|
||||||
<string name="pageTitleUserAccounts">Manage Accounts</string>
|
<string name="pageTitleUserAccounts">Manage Accounts</string>
|
||||||
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Demo repo</string>
|
<string name="repoName">Demo repo</string>
|
||||||
<string name="repoFullName">Repo with ORG</string>
|
<string name="repoFullName">Repo with ORG</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">No description</string>
|
<string name="milestoneNoDescription">No description</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Select Labels</string>
|
<string name="newIssueSelectLabelsListTitle">Select Labels</string>
|
||||||
<string name="newIssueTitle">Title</string>
|
<string name="newIssueTitle">Title</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Closed</string>
|
<string name="isClosed">Closed</string>
|
||||||
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<string name="genericCopyUrl">Copy URL</string>
|
<string name="genericCopyUrl">Copy URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Explore repositories</string>
|
<string name="exploreTextBoxHint">Explore repositories</string>
|
||||||
<string name="starRepository">Star Repository</string>
|
<string name="starRepository">Star Repository</string>
|
||||||
<string name="unStarRepository">Unstar Repository</string>
|
<string name="unStarRepository">Unstar Repository</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
||||||
<string name="titleDrafts">Drafts</string>
|
<string name="titleDrafts">Drafts</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
||||||
<string name="versionUnknown">No Gitea detected!</string>
|
<string name="versionUnknown">No Gitea detected!</string>
|
||||||
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
||||||
<string name="openFileDiffText">Files Changed</string>
|
<string name="openFileDiffText">Files Changed</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Merge Pull Request</string>
|
<string name="mergePullRequestText">Merge Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notifications</string>
|
<string name="pageTitleNotifications">Notifications</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">No notifications found</string>
|
||||||
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minutes</string>
|
<string name="pollingDelaySelectedText">%d Minutes</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">À propos</string>
|
<string name="navAbout">À propos</string>
|
||||||
<string name="navRate">Noter GitNex</string>
|
<string name="navRate">Noter GitNex</string>
|
||||||
<string name="navLogout">Déconnexion</string>
|
<string name="navLogout">Déconnexion</string>
|
||||||
|
<string name="navExplore">Explorer</string>
|
||||||
<string name="navAdministration">Administration</string>
|
<string name="navAdministration">Administration</string>
|
||||||
|
<string name="navSearchIssuesPulls">Rechercher des tickets</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">À propos</string>
|
<string name="pageTitleAbout">À propos</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Administration de Gitea</string>
|
<string name="pageTitleAdministration">Administration de Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">Gestion des comptes</string>
|
<string name="pageTitleUserAccounts">Gestion des comptes</string>
|
||||||
<string name="pageTitleNewPullRequest">Nouvelle demande de tirage</string>
|
<string name="pageTitleNewPullRequest">Nouvelle demande de tirage</string>
|
||||||
<string name="pageTitleUsers">Utilisateurs</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Dépôt de démonstration</string>
|
<string name="repoName">Dépôt de démonstration</string>
|
||||||
<string name="repoFullName">Nom complet du dépôt</string>
|
<string name="repoFullName">Nom complet du dépôt</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">Pas de description</string>
|
<string name="milestoneNoDescription">Pas de description</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d ouvert</string>
|
<string name="milestoneIssueStatusOpen">%1$d ouvert</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d fermé</string>
|
<string name="milestoneIssueStatusClosed">%1$d fermé</string>
|
||||||
<string name="selectMilestone">Sélectionner un jalon</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Assignés</string>
|
<string name="newIssueSelectAssigneesListTitle">Assignés</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Sélectionner des étiquettes</string>
|
<string name="newIssueSelectLabelsListTitle">Sélectionner des étiquettes</string>
|
||||||
<string name="newIssueTitle">Titre</string>
|
<string name="newIssueTitle">Titre</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Fermé</string>
|
<string name="isClosed">Fermé</string>
|
||||||
<string name="genericServerResponseError">Impossible de se connecter au serveur pour le moment, veuillez vérifier son statut puis réessayer</string>
|
<string name="genericServerResponseError">Impossible de se connecter au serveur pour le moment, veuillez vérifier son statut puis réessayer</string>
|
||||||
<string name="genericCopyUrl">Copier l’URL</string>
|
<string name="genericCopyUrl">Copier l’URL</string>
|
||||||
<string name="genericWaitFor">Attendez un instant ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Voir les utilisateurs</string>
|
|
||||||
<string name="exploreIssues">Voir les tickets</string>
|
|
||||||
<string name="exploreTextBoxHint">Explorer les dépôts</string>
|
<string name="exploreTextBoxHint">Explorer les dépôts</string>
|
||||||
<string name="starRepository">Ajouter aux favoris</string>
|
<string name="starRepository">Ajouter aux favoris</string>
|
||||||
<string name="unStarRepository">Retirer des favoris</string>
|
<string name="unStarRepository">Retirer des favoris</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Vous suivez ce dépôt</string>
|
<string name="watchRepositorySuccess">Vous suivez ce dépôt</string>
|
||||||
<string name="unWatchRepositorySuccess">Vous ne suivez plus ce dépôt</string>
|
<string name="unWatchRepositorySuccess">Vous ne suivez plus ce dépôt</string>
|
||||||
<string name="titleDrafts">Brouillons</string>
|
<string name="titleDrafts">Brouillons</string>
|
||||||
<string name="versionUnsupportedOld">Version périmée de Gitea (%1$s) détectée. Veuillez mettre à jour vers la dernière version stable. Si vous continuez, l’application peut ne pas fonctionner correctement.</string>
|
<string name="versionUnsupportedOld">Ancienne version de Gitea détectée (%1$s). Faire la mise à jour vers la dernière version stable est fortement recommandé.</string>
|
||||||
<string name="versionUnsupportedNew">Nouvelle version de Gitea détectée ! Veuillez mettre à jour GitNex !</string>
|
<string name="versionUnsupportedNew">Nouvelle version de Gitea détectée ! Veuillez mettre à jour GitNex !</string>
|
||||||
<string name="versionUnknown">Aucun serveur Gitea détecté !</string>
|
<string name="versionUnknown">Aucun serveur Gitea détecté !</string>
|
||||||
<string name="versionAlertDialogHeader">Version de Gitea non prise en charge</string>
|
<string name="versionAlertDialogHeader">Version de Gitea non prise en charge</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s fichiers modifiés</string>
|
<string name="fileDiffViewHeader">%1$s fichiers modifiés</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s fichier modifié</string>
|
<string name="fileDiffViewHeaderSingle">%1$s fichier modifié</string>
|
||||||
<string name="openFileDiffText">Fichiers modifiés</string>
|
<string name="openFileDiffText">Fichiers modifiés</string>
|
||||||
<string name="updatePullRequestText">Mettre à jour la demande de tirage</string>
|
|
||||||
<string name="mergePullRequestText">Fusionner la demande de tirage</string>
|
<string name="mergePullRequestText">Fusionner la demande de tirage</string>
|
||||||
<string name="deletePrHeadBranch">Supprimer la branche courante</string>
|
<string name="deletePrHeadBranch">Supprimer la branche courante</string>
|
||||||
<string name="deleteBranchSuccess">Branche supprimée</string>
|
<string name="deleteBranchSuccess">Branche supprimée</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Passé au compte : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Passé au compte : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notifications</string>
|
<string name="pageTitleNotifications">Notifications</string>
|
||||||
<string name="noDataNotifications">C’est parti 🚀</string>
|
<string name="noDataNotifications">Aucune notification</string>
|
||||||
<string name="notificationsPollingHeaderText">Période de scrutation</string>
|
<string name="notificationsPollingHeaderText">Période de scrutation</string>
|
||||||
<string name="pollingDelaySelectedText">%d minutes</string>
|
<string name="pollingDelaySelectedText">%d minutes</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Période de scrutation</string>
|
<string name="pollingDelayDialogHeaderText">Période de scrutation</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indique la progression des téléchargements</string>
|
<string name="fileViewerNotificationChannelDescription">Indique la progression des téléchargements</string>
|
||||||
<string name="lastUpdatedAt">%s mis à jour</string>
|
<string name="lastUpdatedAt">%s mis à jour</string>
|
||||||
<string name="joined">Inscrit</string>
|
<string name="joined">Inscrit</string>
|
||||||
<string name="userFollow">Suivre</string>
|
|
||||||
<string name="unfollowUser">Ne plus suivre</string>
|
|
||||||
<string name="unfollowedUser">Vous ne suivez plus %s</string>
|
|
||||||
<string name="nowFollowUser">Vous suivez @%s</string>
|
|
||||||
<string name="unfollowingFailed">Impossible de ne plus suivre l’utilisateur</string>
|
|
||||||
<string name="followingFailed">Impossible de suivre l’utilisateur</string>
|
|
||||||
<string name="updatePrConflict">La requête de tirage est en conflit avec la branche principale. Veuillez résoudre ce conflit, puis réessayez.</string>
|
|
||||||
<string name="updatePrSuccess">Requête de tirage créée</string>
|
|
||||||
<string name="updateStrategyMerge">Fusionner</string>
|
|
||||||
<string name="updateStrategyRebase">Rebaser</string>
|
|
||||||
<string name="selectUpdateStrategy">Stratégie de mise à jour</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">Info su</string>
|
<string name="navAbout">Info su</string>
|
||||||
<string name="navRate">Valuta GitNex</string>
|
<string name="navRate">Valuta GitNex</string>
|
||||||
<string name="navLogout">Esci</string>
|
<string name="navLogout">Esci</string>
|
||||||
|
<string name="navExplore">Esplora</string>
|
||||||
<string name="navAdministration">Amministrazione</string>
|
<string name="navAdministration">Amministrazione</string>
|
||||||
|
<string name="navSearchIssuesPulls">Cerca segnalazioni</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">Info su</string>
|
<string name="pageTitleAbout">Info su</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Amministrazione Gitea</string>
|
<string name="pageTitleAdministration">Amministrazione Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">Gestione Account</string>
|
<string name="pageTitleUserAccounts">Gestione Account</string>
|
||||||
<string name="pageTitleNewPullRequest">Nuova Pull Request</string>
|
<string name="pageTitleNewPullRequest">Nuova Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Demo repo</string>
|
<string name="repoName">Demo repo</string>
|
||||||
<string name="repoFullName">Repo con ORG</string>
|
<string name="repoFullName">Repo con ORG</string>
|
||||||
@ -152,7 +153,6 @@ URL è richiesto</string>
|
|||||||
<string name="milestoneNoDescription">Nessuna descrizione</string>
|
<string name="milestoneNoDescription">Nessuna descrizione</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d Aperto</string>
|
<string name="milestoneIssueStatusOpen">%1$d Aperto</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d Chiuso</string>
|
<string name="milestoneIssueStatusClosed">%1$d Chiuso</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Seleziona Assegnatari</string>
|
<string name="newIssueSelectAssigneesListTitle">Seleziona Assegnatari</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Seleziona labels</string>
|
<string name="newIssueSelectLabelsListTitle">Seleziona labels</string>
|
||||||
<string name="newIssueTitle">Titolo</string>
|
<string name="newIssueTitle">Titolo</string>
|
||||||
@ -430,10 +430,7 @@ autorizzazione</string>
|
|||||||
<string name="isClosed">Chiuso</string>
|
<string name="isClosed">Chiuso</string>
|
||||||
<string name="genericServerResponseError">Al momento non possiamo raggiungere il server, controlla lo stato del tuo server e riprova</string>
|
<string name="genericServerResponseError">Al momento non possiamo raggiungere il server, controlla lo stato del tuo server e riprova</string>
|
||||||
<string name="genericCopyUrl">Copia l\'URL</string>
|
<string name="genericCopyUrl">Copia l\'URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Esplora i repository</string>
|
<string name="exploreTextBoxHint">Esplora i repository</string>
|
||||||
<string name="starRepository">Repository star</string>
|
<string name="starRepository">Repository star</string>
|
||||||
<string name="unStarRepository">Unstar Repository</string>
|
<string name="unStarRepository">Unstar Repository</string>
|
||||||
@ -444,7 +441,7 @@ autorizzazione</string>
|
|||||||
<string name="watchRepositorySuccess">Repository aggiunto alla watch list</string>
|
<string name="watchRepositorySuccess">Repository aggiunto alla watch list</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository rimosso dalla watchlist</string>
|
<string name="unWatchRepositorySuccess">Repository rimosso dalla watchlist</string>
|
||||||
<string name="titleDrafts">Bozze</string>
|
<string name="titleDrafts">Bozze</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">Nuova versione di Gitea rilevata! Si prega di AGGIORNARE GitNex!</string>
|
<string name="versionUnsupportedNew">Nuova versione di Gitea rilevata! Si prega di AGGIORNARE GitNex!</string>
|
||||||
<string name="versionUnknown">Nessun Gitea rilevato!</string>
|
<string name="versionUnknown">Nessun Gitea rilevato!</string>
|
||||||
<string name="versionAlertDialogHeader">Versione non supportata di Gitea</string>
|
<string name="versionAlertDialogHeader">Versione non supportata di Gitea</string>
|
||||||
@ -462,7 +459,6 @@ autorizzazione</string>
|
|||||||
<string name="fileDiffViewHeader">%1$s File modificati</string>
|
<string name="fileDiffViewHeader">%1$s File modificati</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s File modificati</string>
|
<string name="fileDiffViewHeaderSingle">%1$s File modificati</string>
|
||||||
<string name="openFileDiffText">File modificati</string>
|
<string name="openFileDiffText">File modificati</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Unisci Pull Request</string>
|
<string name="mergePullRequestText">Unisci Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -553,7 +549,7 @@ autorizzazione</string>
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notifiche</string>
|
<string name="pageTitleNotifications">Notifiche</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">Nessuna notifica trovata</string>
|
||||||
<string name="notificationsPollingHeaderText">Intervallo di ricerca notifiche</string>
|
<string name="notificationsPollingHeaderText">Intervallo di ricerca notifiche</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minuti</string>
|
<string name="pollingDelaySelectedText">%d Minuti</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Seleziona l\'intervallo per la ricerca</string>
|
<string name="pollingDelayDialogHeaderText">Seleziona l\'intervallo per la ricerca</string>
|
||||||
@ -634,15 +630,4 @@ autorizzazione</string>
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">Par</string>
|
<string name="navAbout">Par</string>
|
||||||
<string name="navRate">Rate GitNex</string>
|
<string name="navRate">Rate GitNex</string>
|
||||||
<string name="navLogout">Logout</string>
|
<string name="navLogout">Logout</string>
|
||||||
|
<string name="navExplore">Izpētīt</string>
|
||||||
<string name="navAdministration">Administration</string>
|
<string name="navAdministration">Administration</string>
|
||||||
|
<string name="navSearchIssuesPulls">Search Issues</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">Par</string>
|
<string name="pageTitleAbout">Par</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Gitea Administration</string>
|
<string name="pageTitleAdministration">Gitea Administration</string>
|
||||||
<string name="pageTitleUserAccounts">Manage Accounts</string>
|
<string name="pageTitleUserAccounts">Manage Accounts</string>
|
||||||
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
<string name="pageTitleNewPullRequest">New Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Demo repo</string>
|
<string name="repoName">Demo repo</string>
|
||||||
<string name="repoFullName">Repo with ORG</string>
|
<string name="repoFullName">Repo with ORG</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">No description</string>
|
<string name="milestoneNoDescription">No description</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
<string name="newIssueSelectAssigneesListTitle">Select Assignees</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Select Labels</string>
|
<string name="newIssueSelectLabelsListTitle">Select Labels</string>
|
||||||
<string name="newIssueTitle">Title</string>
|
<string name="newIssueTitle">Title</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Closed</string>
|
<string name="isClosed">Closed</string>
|
||||||
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<string name="genericCopyUrl">Copy URL</string>
|
<string name="genericCopyUrl">Copy URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Explore repositories</string>
|
<string name="exploreTextBoxHint">Explore repositories</string>
|
||||||
<string name="starRepository">Star Repository</string>
|
<string name="starRepository">Star Repository</string>
|
||||||
<string name="unStarRepository">Unstar Repository</string>
|
<string name="unStarRepository">Unstar Repository</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
<string name="watchRepositorySuccess">Repository added to watch list</string>
|
||||||
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
<string name="unWatchRepositorySuccess">Repository removed from watch list</string>
|
||||||
<string name="titleDrafts">Drafts</string>
|
<string name="titleDrafts">Drafts</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
<string name="versionUnsupportedNew">New Gitea version detected! Please UPDATE GitNex!</string>
|
||||||
<string name="versionUnknown">No Gitea detected!</string>
|
<string name="versionUnknown">No Gitea detected!</string>
|
||||||
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
<string name="versionAlertDialogHeader">Unsupported Version of Gitea</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
<string name="fileDiffViewHeader">%1$s Files Changed</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
<string name="fileDiffViewHeaderSingle">%1$s File Changed</string>
|
||||||
<string name="openFileDiffText">Files Changed</string>
|
<string name="openFileDiffText">Files Changed</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Merge Pull Request</string>
|
<string name="mergePullRequestText">Merge Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notifications</string>
|
<string name="pageTitleNotifications">Notifications</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">No notifications found</string>
|
||||||
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minutes</string>
|
<string name="pollingDelaySelectedText">%d Minutes</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">O programie</string>
|
<string name="navAbout">O programie</string>
|
||||||
<string name="navRate">Oceń GitNex</string>
|
<string name="navRate">Oceń GitNex</string>
|
||||||
<string name="navLogout">Wyloguj się</string>
|
<string name="navLogout">Wyloguj się</string>
|
||||||
|
<string name="navExplore">Przeglądaj</string>
|
||||||
<string name="navAdministration">Administracja</string>
|
<string name="navAdministration">Administracja</string>
|
||||||
|
<string name="navSearchIssuesPulls">Wyszukaj problemy</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">O programie</string>
|
<string name="pageTitleAbout">O programie</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Administracja Gitea</string>
|
<string name="pageTitleAdministration">Administracja Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">Zarządzaj Kontami</string>
|
<string name="pageTitleUserAccounts">Zarządzaj Kontami</string>
|
||||||
<string name="pageTitleNewPullRequest">Nowy Pull Request</string>
|
<string name="pageTitleNewPullRequest">Nowy Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Repozytorium demo</string>
|
<string name="repoName">Repozytorium demo</string>
|
||||||
<string name="repoFullName">Repozytorium z ORG</string>
|
<string name="repoFullName">Repozytorium z ORG</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">Brak opisu</string>
|
<string name="milestoneNoDescription">Brak opisu</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
<string name="milestoneIssueStatusOpen">%1$d Open</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
<string name="milestoneIssueStatusClosed">%1$d Closed</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Wybierz przypisane osoby</string>
|
<string name="newIssueSelectAssigneesListTitle">Wybierz przypisane osoby</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Wybierz etykiety</string>
|
<string name="newIssueSelectLabelsListTitle">Wybierz etykiety</string>
|
||||||
<string name="newIssueTitle">Tytuł</string>
|
<string name="newIssueTitle">Tytuł</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Closed</string>
|
<string name="isClosed">Closed</string>
|
||||||
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
<string name="genericServerResponseError">We cannot reach the server at the moment, please check your server status and try again</string>
|
||||||
<string name="genericCopyUrl">Kopiuj adres URL</string>
|
<string name="genericCopyUrl">Kopiuj adres URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Przeglądaj repozytoria</string>
|
<string name="exploreTextBoxHint">Przeglądaj repozytoria</string>
|
||||||
<string name="starRepository">Ogwiazdkuj repozytorium</string>
|
<string name="starRepository">Ogwiazdkuj repozytorium</string>
|
||||||
<string name="unStarRepository">Odgwiazdkuj repozytorium</string>
|
<string name="unStarRepository">Odgwiazdkuj repozytorium</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repozytorium dodane do listy obserwowanych</string>
|
<string name="watchRepositorySuccess">Repozytorium dodane do listy obserwowanych</string>
|
||||||
<string name="unWatchRepositorySuccess">Repozytorium usunięte z listy obserwacyjnej</string>
|
<string name="unWatchRepositorySuccess">Repozytorium usunięte z listy obserwacyjnej</string>
|
||||||
<string name="titleDrafts">Drafts</string>
|
<string name="titleDrafts">Drafts</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, the app may not function properly</string>
|
||||||
<string name="versionUnsupportedNew">Wykryto nową wersję Gitea! Proszę ZAKTUALIZOWAĆ GitNex!</string>
|
<string name="versionUnsupportedNew">Wykryto nową wersję Gitea! Proszę ZAKTUALIZOWAĆ GitNex!</string>
|
||||||
<string name="versionUnknown">No Gitea detected!</string>
|
<string name="versionUnknown">No Gitea detected!</string>
|
||||||
<string name="versionAlertDialogHeader">Nieobsługiwana wersja Gitea</string>
|
<string name="versionAlertDialogHeader">Nieobsługiwana wersja Gitea</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s Plików zmienionych</string>
|
<string name="fileDiffViewHeader">%1$s Plików zmienionych</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s Plik zmieniony</string>
|
<string name="fileDiffViewHeaderSingle">%1$s Plik zmieniony</string>
|
||||||
<string name="openFileDiffText">Pliki zmienione</string>
|
<string name="openFileDiffText">Pliki zmienione</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Scal Pull Request</string>
|
<string name="mergePullRequestText">Scal Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Switched to account : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Powiadomienia</string>
|
<string name="pageTitleNotifications">Powiadomienia</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">Brak powiadomień</string>
|
||||||
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
<string name="notificationsPollingHeaderText">Notifications Polling Delay</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minut(y)</string>
|
<string name="pollingDelaySelectedText">%d Minut(y)</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
<string name="pollingDelayDialogHeaderText">Select Polling Delay</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Zaktualizowano %s</string>
|
<string name="lastUpdatedAt">Zaktualizowano %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
<string name="navAbout">Sobre</string>
|
<string name="navAbout">Sobre</string>
|
||||||
<string name="navRate">Avalie o GitNex</string>
|
<string name="navRate">Avalie o GitNex</string>
|
||||||
<string name="navLogout">Sair</string>
|
<string name="navLogout">Sair</string>
|
||||||
|
<string name="navExplore">Explorar</string>
|
||||||
<string name="navAdministration">Administração</string>
|
<string name="navAdministration">Administração</string>
|
||||||
|
<string name="navSearchIssuesPulls">Pesquisar incidentes</string>
|
||||||
<!-- menu items -->
|
<!-- menu items -->
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="pageTitleAbout">Sobre</string>
|
<string name="pageTitleAbout">Sobre</string>
|
||||||
@ -37,7 +39,6 @@
|
|||||||
<string name="pageTitleAdministration">Administração de Gitea</string>
|
<string name="pageTitleAdministration">Administração de Gitea</string>
|
||||||
<string name="pageTitleUserAccounts">Gerenciar contas</string>
|
<string name="pageTitleUserAccounts">Gerenciar contas</string>
|
||||||
<string name="pageTitleNewPullRequest">Novo Pull Request</string>
|
<string name="pageTitleNewPullRequest">Novo Pull Request</string>
|
||||||
<string name="pageTitleUsers">Users</string>
|
|
||||||
<!-- page titles -->
|
<!-- page titles -->
|
||||||
<string name="repoName">Repo demo</string>
|
<string name="repoName">Repo demo</string>
|
||||||
<string name="repoFullName">Repo com ORG</string>
|
<string name="repoFullName">Repo com ORG</string>
|
||||||
@ -151,7 +152,6 @@
|
|||||||
<string name="milestoneNoDescription">Sem descrição</string>
|
<string name="milestoneNoDescription">Sem descrição</string>
|
||||||
<string name="milestoneIssueStatusOpen">%1$d Aberto</string>
|
<string name="milestoneIssueStatusOpen">%1$d Aberto</string>
|
||||||
<string name="milestoneIssueStatusClosed">%1$d Fechado</string>
|
<string name="milestoneIssueStatusClosed">%1$d Fechado</string>
|
||||||
<string name="selectMilestone">Select Milestone</string>
|
|
||||||
<string name="newIssueSelectAssigneesListTitle">Selecionar designados</string>
|
<string name="newIssueSelectAssigneesListTitle">Selecionar designados</string>
|
||||||
<string name="newIssueSelectLabelsListTitle">Selecionar marcadores</string>
|
<string name="newIssueSelectLabelsListTitle">Selecionar marcadores</string>
|
||||||
<string name="newIssueTitle">Título</string>
|
<string name="newIssueTitle">Título</string>
|
||||||
@ -428,10 +428,7 @@
|
|||||||
<string name="isClosed">Fechado</string>
|
<string name="isClosed">Fechado</string>
|
||||||
<string name="genericServerResponseError">Não conseguimos encontrar o servidor no momento, por favor, verifique o status do seu servidor e tente novamente</string>
|
<string name="genericServerResponseError">Não conseguimos encontrar o servidor no momento, por favor, verifique o status do seu servidor e tente novamente</string>
|
||||||
<string name="genericCopyUrl">Copiar URL</string>
|
<string name="genericCopyUrl">Copiar URL</string>
|
||||||
<string name="genericWaitFor">Hold on ☕</string>
|
|
||||||
<!-- generic copy -->
|
<!-- generic copy -->
|
||||||
<string name="exploreUsers">Explore users</string>
|
|
||||||
<string name="exploreIssues">Explore issues</string>
|
|
||||||
<string name="exploreTextBoxHint">Explorar repositórios</string>
|
<string name="exploreTextBoxHint">Explorar repositórios</string>
|
||||||
<string name="starRepository">Favoritar repositório</string>
|
<string name="starRepository">Favoritar repositório</string>
|
||||||
<string name="unStarRepository">Desfavoritar repositório</string>
|
<string name="unStarRepository">Desfavoritar repositório</string>
|
||||||
@ -442,7 +439,7 @@
|
|||||||
<string name="watchRepositorySuccess">Repositório adicionado à lista de observação</string>
|
<string name="watchRepositorySuccess">Repositório adicionado à lista de observação</string>
|
||||||
<string name="unWatchRepositorySuccess">Repositório removido da lista de observação</string>
|
<string name="unWatchRepositorySuccess">Repositório removido da lista de observação</string>
|
||||||
<string name="titleDrafts">Rascunhos</string>
|
<string name="titleDrafts">Rascunhos</string>
|
||||||
<string name="versionUnsupportedOld">Unsupported old version(%1$s) of Gitea detected. Please update to latest stable version. If you continue, some features may not work.</string>
|
<string name="versionUnsupportedOld">Foi detectada uma versão(%1$s) de Gitea desatualizada e sem suporte. Por favor, atualize para a versão mais recente. Se você continuar, o aplicativo pode não funcionar corretamente</string>
|
||||||
<string name="versionUnsupportedNew">Nova versão do Gitea detectada! Por favor, ATUALIZE o GitNex!</string>
|
<string name="versionUnsupportedNew">Nova versão do Gitea detectada! Por favor, ATUALIZE o GitNex!</string>
|
||||||
<string name="versionUnknown">Gitea não detectado!</string>
|
<string name="versionUnknown">Gitea não detectado!</string>
|
||||||
<string name="versionAlertDialogHeader">Versão do Gitea não suportada</string>
|
<string name="versionAlertDialogHeader">Versão do Gitea não suportada</string>
|
||||||
@ -460,7 +457,6 @@
|
|||||||
<string name="fileDiffViewHeader">%1$s Arquivos Alterados</string>
|
<string name="fileDiffViewHeader">%1$s Arquivos Alterados</string>
|
||||||
<string name="fileDiffViewHeaderSingle">%1$s Arquivo Alterado</string>
|
<string name="fileDiffViewHeaderSingle">%1$s Arquivo Alterado</string>
|
||||||
<string name="openFileDiffText">Arquivos alterados</string>
|
<string name="openFileDiffText">Arquivos alterados</string>
|
||||||
<string name="updatePullRequestText">Update Pull Request</string>
|
|
||||||
<string name="mergePullRequestText">Aplicar merge do Pull Request</string>
|
<string name="mergePullRequestText">Aplicar merge do Pull Request</string>
|
||||||
<string name="deletePrHeadBranch">Delete head branch</string>
|
<string name="deletePrHeadBranch">Delete head branch</string>
|
||||||
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
<string name="deleteBranchSuccess">Branch deleted successfully</string>
|
||||||
@ -551,7 +547,7 @@
|
|||||||
<string name="switchAccountSuccess">Alterado para a conta : %1$s@%2$s</string>
|
<string name="switchAccountSuccess">Alterado para a conta : %1$s@%2$s</string>
|
||||||
<!-- Notifications -->
|
<!-- Notifications -->
|
||||||
<string name="pageTitleNotifications">Notificações</string>
|
<string name="pageTitleNotifications">Notificações</string>
|
||||||
<string name="noDataNotifications">All caught up 🚀</string>
|
<string name="noDataNotifications">Sem notificações</string>
|
||||||
<string name="notificationsPollingHeaderText">Atraso da Enquete das Notificações</string>
|
<string name="notificationsPollingHeaderText">Atraso da Enquete das Notificações</string>
|
||||||
<string name="pollingDelaySelectedText">%d Minutos</string>
|
<string name="pollingDelaySelectedText">%d Minutos</string>
|
||||||
<string name="pollingDelayDialogHeaderText">Selecionar atraso da votação</string>
|
<string name="pollingDelayDialogHeaderText">Selecionar atraso da votação</string>
|
||||||
@ -632,15 +628,4 @@
|
|||||||
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
<string name="fileViewerNotificationChannelDescription">Indicates the progress of ongoing downloads</string>
|
||||||
<string name="lastUpdatedAt">Updated %s</string>
|
<string name="lastUpdatedAt">Updated %s</string>
|
||||||
<string name="joined">Joined</string>
|
<string name="joined">Joined</string>
|
||||||
<string name="userFollow">Follow</string>
|
|
||||||
<string name="unfollowUser">Unfollow</string>
|
|
||||||
<string name="unfollowedUser">Unfollowed @%s</string>
|
|
||||||
<string name="nowFollowUser">You now follow @%s</string>
|
|
||||||
<string name="unfollowingFailed">Couldn\'t unfollow user</string>
|
|
||||||
<string name="followingFailed">Couldn\'t follow user</string>
|
|
||||||
<string name="updatePrConflict">The pull request conflicts with the base branch. Please resolve the conflicts and try again.</string>
|
|
||||||
<string name="updatePrSuccess">Pull Request updated successfully</string>
|
|
||||||
<string name="updateStrategyMerge">Merge</string>
|
|
||||||
<string name="updateStrategyRebase">Rebase</string>
|
|
||||||
<string name="selectUpdateStrategy">Select Update Strategy</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user