Compare commits

...

10 Commits
3.0.1 ... 2.3.1

9 changed files with 40 additions and 9 deletions

View File

@ -6,8 +6,8 @@ android {
applicationId "org.mian.gitnex" applicationId "org.mian.gitnex"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 29 targetSdkVersion 29
versionCode 80 versionCode 81
versionName "2.3.0" versionName "2.3.1"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
buildTypes { buildTypes {

View File

@ -26,6 +26,8 @@ import org.mian.gitnex.helpers.Toasty;
import org.mian.gitnex.models.Files; import org.mian.gitnex.models.Files;
import org.mian.gitnex.util.AppUtil; import org.mian.gitnex.util.AppUtil;
import org.mian.gitnex.util.TinyDB; import org.mian.gitnex.util.TinyDB;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import retrofit2.Call; import retrofit2.Call;
import retrofit2.Callback; import retrofit2.Callback;
@ -76,6 +78,19 @@ public class FileViewActivity extends AppCompatActivity {
initCloseListener(); initCloseListener();
closeActivity.setOnClickListener(onClickListener); closeActivity.setOnClickListener(onClickListener);
try {
singleFileName = URLDecoder.decode(singleFileName, "UTF-8");
singleFileName = singleFileName.replaceAll("//", "/");
}
catch (UnsupportedEncodingException e) {
assert singleFileName != null;
Log.i("singleFileName", singleFileName);
}
getSingleFileContents(instanceUrl, instanceToken, repoOwner, repoName, singleFileName); getSingleFileContents(instanceUrl, instanceToken, repoOwner, repoName, singleFileName);
} }

View File

@ -168,12 +168,12 @@ public class ClosedIssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewH
final String locale = tinyDb.getString("locale"); final String locale = tinyDb.getString("locale");
final String timeFormat = tinyDb.getString("dateFormat"); final String timeFormat = tinyDb.getString("dateFormat");
if(issuesModel.getPull_request() != null) { /*if(issuesModel.getPull_request() != null) {
if (issuesModel.getPull_request().isMerged()) { if (issuesModel.getPull_request().isMerged()) {
relativeLayoutFrame.setVisibility(View.GONE); relativeLayoutFrame.setVisibility(View.GONE);
relativeLayoutFrame.setLayoutParams(new RecyclerView.LayoutParams(0, 0)); relativeLayoutFrame.setLayoutParams(new RecyclerView.LayoutParams(0, 0));
} }
} }*/
if (!issuesModel.getUser().getFull_name().equals("")) { if (!issuesModel.getUser().getFull_name().equals("")) {
issueAssigneeAvatar.setOnClickListener(new ClickListener(context.getResources().getString(R.string.issueCreator) + issuesModel.getUser().getFull_name(), context)); issueAssigneeAvatar.setOnClickListener(new ClickListener(context.getResources().getString(R.string.issueCreator) + issuesModel.getUser().getFull_name(), context));

View File

@ -168,12 +168,12 @@ public class IssuesAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
final String locale = tinyDb.getString("locale"); final String locale = tinyDb.getString("locale");
final String timeFormat = tinyDb.getString("dateFormat"); final String timeFormat = tinyDb.getString("dateFormat");
if(issuesModel.getPull_request() != null) { /*if(issuesModel.getPull_request() != null) {
if (!issuesModel.getPull_request().isMerged()) { if (!issuesModel.getPull_request().isMerged()) {
relativeLayoutFrame.setVisibility(View.GONE); relativeLayoutFrame.setVisibility(View.GONE);
relativeLayoutFrame.setLayoutParams(new RecyclerView.LayoutParams(0, 0)); relativeLayoutFrame.setLayoutParams(new RecyclerView.LayoutParams(0, 0));
} }
} }*/
if (!issuesModel.getUser().getFull_name().equals("")) { if (!issuesModel.getUser().getFull_name().equals("")) {
issueAssigneeAvatar.setOnClickListener(new ClickListener(context.getResources().getString(R.string.issueCreator) + issuesModel.getUser().getFull_name(), context)); issueAssigneeAvatar.setOnClickListener(new ClickListener(context.getResources().getString(R.string.issueCreator) + issuesModel.getUser().getFull_name(), context));

View File

@ -218,7 +218,7 @@ public class AppUtil {
"coffee", "rc", "rs", "rust", "basic", "clj", "css", "dart", "lisp", "erl", "hs", "lsp", "rkt", "coffee", "rc", "rs", "rust", "basic", "clj", "css", "dart", "lisp", "erl", "hs", "lsp", "rkt",
"ss", "llvm", "ll", "lua", "matlab", "pascal", "r", "scala", "sql", "latex", "tex", "vb", "vbs", "ss", "llvm", "ll", "lua", "matlab", "pascal", "r", "scala", "sql", "latex", "tex", "vb", "vbs",
"vhd", "tcl", "wiki.meta", "yaml", "yml", "markdown", "xml", "proto", "regex", "py", "pl", "js", "vhd", "tcl", "wiki.meta", "yaml", "yml", "markdown", "xml", "proto", "regex", "py", "pl", "js",
"html", "htm", "volt", "ini", "htaccess", "conf", "gitignore"}; "html", "htm", "volt", "ini", "htaccess", "conf", "gitignore", "gradle", "txt", "properties", "bat"};
return Arrays.asList(extValues).contains(ext); return Arrays.asList(extValues).contains(ext);

View File

@ -64,6 +64,7 @@
android:textColor="@color/colorWhite" android:textColor="@color/colorWhite"
android:textSize="14sp" android:textSize="14sp"
android:padding="15dp" android:padding="15dp"
android:textIsSelectable="true"
/> />
</ScrollView> </ScrollView>

View File

@ -39,14 +39,18 @@
android:id="@+id/loginMethod" android:id="@+id/loginMethod"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:paddingStart="5dp"
android:paddingEnd="5dp"
android:layout_margin="10dp"
android:background="@drawable/shape_inputs"
android:orientation="vertical">
<RadioButton <RadioButton
android:id="@+id/loginUsernamePassword" android:id="@+id/loginUsernamePassword"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/loginViaPassword" android:text="@string/loginViaPassword"
android:checked="true" android:checked="true"
android:layout_marginEnd="30dp"
android:theme="@style/radioButtonsInDarkTheme" android:theme="@style/radioButtonsInDarkTheme"
android:textColor="@color/white"/> android:textColor="@color/white"/>
<RadioButton <RadioButton
@ -56,6 +60,7 @@
android:text="@string/copyToken" android:text="@string/copyToken"
android:theme="@style/radioButtonsInDarkTheme" android:theme="@style/radioButtonsInDarkTheme"
android:textColor="@color/white"/> android:textColor="@color/white"/>
</RadioGroup> </RadioGroup>
<LinearLayout <LinearLayout

View File

@ -33,6 +33,8 @@
<item name="android:background">@android:color/transparent</item> <item name="android:background">@android:color/transparent</item>
<item name="android:textColor">@android:color/white</item> <item name="android:textColor">@android:color/white</item>
<item name="android:colorBackground">@color/colorPrimary</item> <item name="android:colorBackground">@color/colorPrimary</item>
<item name="android:layout_marginStart">3dp</item>
<item name="android:layout_marginEnd">3dp</item>
</style> </style>
<style name="confirmDialog" parent="Theme.AppCompat.Dialog.Alert"> <style name="confirmDialog" parent="Theme.AppCompat.Dialog.Alert">

View File

@ -0,0 +1,8 @@
2.3.1
Improvement: Copy text, support more files in file viewer
Bugfix: Fix RTL alignments
Bugfix: Revert to show all issues/prs
Bugfix: Fix url decode in file viewer
For more, check the release notes.
https://gitea.com/gitnex/GitNex/releases