Compare commits

...

10 Commits

Author SHA1 Message Date
M M Arif
7317f3c841 Merge pull request 'Prepare 2.4.1 release' (#301) from prepare-release-2.4.1 into release-2.4
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/301
2020-03-19 13:24:47 +00:00
M M Arif
8b12e51335 Prepare 2.4.1 release 2020-03-19 18:22:37 +05:00
M M Arif
086f982d26 Merge pull request 'Backport show only issues, use StandardCharsets instead in okhttp' (#300) from backport-show-only-issues into release-2.4
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/300
2020-03-19 13:16:55 +00:00
M M Arif
88feca3564 Backport show only issues, use StandardCharsets instead in okhttp 2020-03-19 18:14:13 +05:00
M M Arif
40337d10b4 Merge pull request 'fixed #297 in release-2.4 branch' (#299) from a671916c/GitNex:release-2.4 into release-2.4
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/299
Reviewed-by: M M Arif <mmarif@swatian.com>
2020-03-18 18:43:37 +00:00
Florian
05056f28ac fixed #297 in release-2.4 branch 2020-03-18 19:32:56 +01:00
M M Arif
94af921a99 Merge pull request 'Fix files breadcrumb nav' (#289) from 287-fix-files-breadcrumb into release-2.4
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/289
2020-03-16 14:47:03 +00:00
M M Arif
ac3cc11920 Fix files breadcrumb nav 2020-03-16 19:40:46 +05:00
M M Arif
23c8bb3a48 Merge pull request 'crowdin update' (#285) from 6543/GitNex:backport_284 into release-2.4
Reviewed-on: https://gitea.com/gitnex/GitNex/pulls/285
Reviewed-by: M M Arif <mmarif@swatian.com>
2020-03-15 18:46:52 +00:00
6543
8c97160737 crowdin update 2020-03-15 19:40:47 +01:00
20 changed files with 101 additions and 27 deletions

View File

@ -6,8 +6,8 @@ android {
applicationId "org.mian.gitnex"
minSdkVersion 21
targetSdkVersion 29
versionCode 90
versionName "2.4.0"
versionCode 91
versionName "2.4.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {

View File

@ -32,6 +32,7 @@ import org.mian.gitnex.util.AppUtil;
import org.mian.gitnex.util.TinyDB;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Objects;
import java.util.UUID;
@ -284,7 +285,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
if(appUtil.checkIntegers(loginOTP_)) {
loginOTP = Integer.valueOf(loginOTP_);
loginOTP = Integer.parseInt(loginOTP_);
}
else {
@ -530,7 +531,7 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
private void letTheUserIn(final String instanceUrl, final String loginUid, final String loginPass, final int loginOTP) {
final String credential = Credentials.basic(loginUid, loginPass);
final String credential = Credentials.basic(loginUid, loginPass, StandardCharsets.UTF_8);
Call<List<UserTokens>> call;
if(loginOTP != 0) {

View File

@ -52,6 +52,7 @@ public class ClosedIssuesFragment extends Fragment {
private TextView noDataIssuesClosed;
private String issueState = "closed";
private int resultLimit = 50;
private String requestType = "issues";
@Nullable
@Override
@ -87,7 +88,7 @@ public class ClosedIssuesFragment extends Fragment {
public void run() {
swipeRefresh.setRefreshing(false);
loadInitial(instanceToken, repoOwner, repoName, issueState, resultLimit);
loadInitial(instanceToken, repoOwner, repoName, issueState, resultLimit, requestType);
adapterClosed.notifyDataChanged();
}
@ -106,7 +107,7 @@ public class ClosedIssuesFragment extends Fragment {
if(issuesListClosed.size() == 10 || pageSize == 10) {
int page = (issuesListClosed.size() + 10) / 10;
loadMore(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, page, issueState, resultLimit);
loadMore(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, page, issueState, resultLimit, requestType);
}
/*else {
@ -125,7 +126,7 @@ public class ClosedIssuesFragment extends Fragment {
recyclerViewClosed.setAdapter(adapterClosed);
apiClosed = IssuesService.createService(ApiInterface.class, instanceUrl, getContext());
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, issueState, resultLimit);
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, issueState, resultLimit, requestType);
return v;
@ -145,16 +146,16 @@ public class ClosedIssuesFragment extends Fragment {
if(tinyDb.getBoolean("resumeClosedIssues")) {
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, issueState, resultLimit);
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, issueState, resultLimit, requestType);
tinyDb.putBoolean("resumeClosedIssues", false);
}
}
private void loadInitial(String token, String repoOwner, String repoName, String issueState, int resultLimit) {
private void loadInitial(String token, String repoOwner, String repoName, String issueState, int resultLimit, String requestType) {
Call<List<Issues>> call = apiClosed.getClosedIssues(token, repoOwner, repoName, 1, issueState, resultLimit);
Call<List<Issues>> call = apiClosed.getClosedIssues(token, repoOwner, repoName, 1, issueState, resultLimit, requestType);
call.enqueue(new Callback<List<Issues>>() {
@ -194,13 +195,13 @@ public class ClosedIssuesFragment extends Fragment {
}
private void loadMore(String token, String repoOwner, String repoName, int page, String issueState, int resultLimit){
private void loadMore(String token, String repoOwner, String repoName, int page, String issueState, int resultLimit, String requestType){
//add loading progress view
issuesListClosed.add(new Issues("load"));
adapterClosed.notifyItemInserted((issuesListClosed.size() - 1));
Call<List<Issues>> call = apiClosed.getClosedIssues(token, repoOwner, repoName, page, issueState, resultLimit);
Call<List<Issues>> call = apiClosed.getClosedIssues(token, repoOwner, repoName, page, issueState, resultLimit, requestType);
call.enqueue(new Callback<List<Issues>>() {

View File

@ -158,7 +158,10 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
String filterDir = fileStructure.getText().toString();
String result = filterDir.substring(0, filterDir.indexOf(item.getSelectedItem()));
fileStructure.setText(result + item.getSelectedItem());
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, finalDirName_);
String currentIndex = (result + item.getSelectedItem()).substring(1);
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, currentIndex);
}

View File

@ -51,6 +51,7 @@ public class IssuesFragment extends Fragment {
private int pageSize = 1;
private TextView noDataIssues;
private int resultLimit = 50;
private String requestType = "issues";
@Nullable
@Override
@ -86,7 +87,7 @@ public class IssuesFragment extends Fragment {
public void run() {
swipeRefresh.setRefreshing(false);
loadInitial(instanceToken, repoOwner, repoName, resultLimit);
loadInitial(instanceToken, repoOwner, repoName, resultLimit, requestType);
adapter.notifyDataChanged();
}
@ -105,7 +106,7 @@ public class IssuesFragment extends Fragment {
if(issuesList.size() == 10 || pageSize == 10) {
int page = (issuesList.size() + 10) / 10;
loadMore(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, page, resultLimit);
loadMore(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, page, resultLimit, requestType);
}
/*else {
@ -124,7 +125,7 @@ public class IssuesFragment extends Fragment {
recyclerView.setAdapter(adapter);
api = IssuesService.createService(ApiInterface.class, instanceUrl, getContext());
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, resultLimit);
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, resultLimit, requestType);
return v;
@ -144,16 +145,16 @@ public class IssuesFragment extends Fragment {
if(tinyDb.getBoolean("resumeIssues")) {
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, resultLimit);
loadInitial(Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, resultLimit, requestType);
tinyDb.putBoolean("resumeIssues", false);
}
}
private void loadInitial(String token, String repoOwner, String repoName, int resultLimit) {
private void loadInitial(String token, String repoOwner, String repoName, int resultLimit, String requestType) {
Call<List<Issues>> call = api.getIssues(token, repoOwner, repoName, 1, resultLimit);
Call<List<Issues>> call = api.getIssues(token, repoOwner, repoName, 1, resultLimit, requestType);
call.enqueue(new Callback<List<Issues>>() {
@ -193,13 +194,13 @@ public class IssuesFragment extends Fragment {
}
private void loadMore(String token, String repoOwner, String repoName, int page, int resultLimit){
private void loadMore(String token, String repoOwner, String repoName, int page, int resultLimit, String requestType){
//add loading progress view
issuesList.add(new Issues("load"));
adapter.notifyItemInserted((issuesList.size() - 1));
Call<List<Issues>> call = api.getIssues(token, repoOwner, repoName, page, resultLimit);
Call<List<Issues>> call = api.getIssues(token, repoOwner, repoName, page, resultLimit, requestType);
call.enqueue(new Callback<List<Issues>>() {

View File

@ -90,10 +90,10 @@ public interface ApiInterface {
Call<UserRepositories> getUserRepository(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName);
@GET("repos/{owner}/{repo}/issues") // get issues by repo
Call<List<Issues>> getIssues(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page, @Query("limit") int limit);
Call<List<Issues>> getIssues(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page, @Query("limit") int limit, @Query("type") String requestType);
@GET("repos/{owner}/{repo}/issues") // get closed issues by repo
Call<List<Issues>> getClosedIssues(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page, @Query("state") String issueState, @Query("limit") int limit);
Call<List<Issues>> getClosedIssues(@Header("Authorization") String token, @Path("owner") String owner, @Path("repo") String repo, @Query("page") int page, @Query("state") String issueState, @Query("limit") int limit, @Query("type") String requestType);
@GET("repos/{owner}/{repo}/issues/{index}") // get issue by id
Call<Issues> getIssueByIndex(@Header("Authorization") String token, @Path("owner") String ownerName, @Path("repo") String repoName, @Path("index") int issueIndex);

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Merge comment</string>
<string name="mergePRSuccessMsg">Pull Request was merged successfully</string>
<string name="mergePR404ErrorMsg">Pull Request is not available for merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Zusammenführ-Kommentar</string>
<string name="mergePRSuccessMsg">Dieser Pull-Request wurde erfolgreich zusammengeführt</string>
<string name="mergePR404ErrorMsg">Pull-Request kann nicht zusammengeführt werden</string>
<string name="downloadFile">Datei herunterladen</string>
<string name="waitLoadingDownloadFile">Bitte warte, bis die Datei in den Speicher geladen wurde</string>
<string name="downloadFileSaved">Datei wurde ins Download-Verzeichnis gespeichert</string>
<string name="excludeFilesInFileviewer">Dieser Dateityp wird nicht vom Datei-Viewer unterstützt. Du kannst sie stattdessen übers Menü herunterladen.</string>
</resources>

View File

@ -445,4 +445,8 @@
<string name="mergeCommentText">Merge comment</string>
<string name="mergePRSuccessMsg">Pull Request was merged successfully</string>
<string name="mergePR404ErrorMsg">Pull Request is not available for merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Merge comment</string>
<string name="mergePRSuccessMsg">Pull Request was merged successfully</string>
<string name="mergePR404ErrorMsg">Pull Request is not available for merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Commentaire de la fusion</string>
<string name="mergePRSuccessMsg">La demande de tirage a été fusionnée</string>
<string name="mergePR404ErrorMsg">La demande de tirage ne peut pas être fusionnée</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -444,4 +444,8 @@ autorizzazione</string>
<string name="mergeCommentText">Unisci commento</string>
<string name="mergePRSuccessMsg">Pull Request è stata unita con successo</string>
<string name="mergePR404ErrorMsg">La Pull Request non è disponibile per l\'merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Merge comment</string>
<string name="mergePRSuccessMsg">Pull Request was merged successfully</string>
<string name="mergePR404ErrorMsg">Pull Request is not available for merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Comentário do merge</string>
<string name="mergePRSuccessMsg">O merge da Pull Request foi aplicado com sucesso</string>
<string name="mergePR404ErrorMsg">Pull Request não está disponível para aplicação do merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -199,10 +199,10 @@
<string name="settingsCustomFontHeaderText">Шрифт</string>
<string name="settingsCustomFontSelectorDialogTitle">Выберите шрифт</string>
<string name="settingsCustomFontDefault">Roboto</string>
<string name="themeSelectorDialogTitle">Select App Theme</string>
<string name="themeSelectionHeaderText">Theme</string>
<string name="settingsPdfModeHeaderText">PDF Night Mode</string>
<string name="fileViewerHeader">File Viewer</string>
<string name="themeSelectorDialogTitle">Выбрать тему приложения</string>
<string name="themeSelectionHeaderText">Тема</string>
<string name="settingsPdfModeHeaderText">Ночной режим PDF</string>
<string name="fileViewerHeader">Просмотрщик файла</string>
<!-- settings -->
<string name="noMoreData">Больше даных нет</string>
<string name="createLabel">Создание метки</string>
@ -442,4 +442,8 @@
<string name="mergeCommentText">Комментарий для слияния</string>
<string name="mergePRSuccessMsg">Запрос на слияние был успешно выполнен</string>
<string name="mergePR404ErrorMsg">Запрос на слияние не доступен для слияния</string>
<string name="downloadFile">Скачать этот файл</string>
<string name="waitLoadingDownloadFile">Пожалуйста дождитесь загрузки файла</string>
<string name="downloadFileSaved">Файл сохранен в папку Загрузки</string>
<string name="excludeFilesInFileviewer">Этот тип файла не поддерживается в средстве просмотра файлов. Загрузить его?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Merge comment</string>
<string name="mergePRSuccessMsg">Pull Request was merged successfully</string>
<string name="mergePR404ErrorMsg">Pull Request is not available for merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Yorumu birleştir</string>
<string name="mergePRSuccessMsg">Çekme İsteği başarıyla birleştirildi</string>
<string name="mergePR404ErrorMsg">Çekme İsteği birleştirme için uygun değil</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Коментар до об\'єднання</string>
<string name="mergePRSuccessMsg">Запит на злиття було успішно об\'єднано</string>
<string name="mergePR404ErrorMsg">Запит на злиття недоступний для об\'єднання</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -442,4 +442,8 @@
<string name="mergeCommentText">Merge comment</string>
<string name="mergePRSuccessMsg">Pull Request was merged successfully</string>
<string name="mergePR404ErrorMsg">Pull Request is not available for merge</string>
<string name="downloadFile">Download This File</string>
<string name="waitLoadingDownloadFile">Please wait for the file to load to memory</string>
<string name="downloadFileSaved">File is saved to Download directory</string>
<string name="excludeFilesInFileviewer">This file type is not supported in file viewer. Download it instead from the three dotted menu?</string>
</resources>

View File

@ -0,0 +1,16 @@
2.4.1
Improvement: Show issues only in Issues Tabs
Bugfix: Files breadcrumb navigation links
Bugfix: Login with special characters
2.4.0
New: Light theme (choose from settings)
New: Download files in Fileviewer (need write permissions)
New: Custom fonts (choose from settings)
New: PDF support in Fileviewer
New: Night mode in PDF (Fileviewer)
New: Default list of repositories in Explore screen
New: Latvian language support
For more, check the release notes.
https://gitea.com/gitnex/GitNex/releases