Merge branch 'backport-243' of gitnex/GitNex into master
This commit is contained in:
commit
e422e3e254
|
@ -23,12 +23,12 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
def lifecycle_version = "2.2.0-rc02"
|
||||
def lifecycle_version = "2.2.0-rc03"
|
||||
final def markwon_version = "4.1.1"
|
||||
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation "androidx.appcompat:appcompat:1.1.0"
|
||||
implementation "com.google.android.material:material:1.2.0-alpha02"
|
||||
implementation "com.google.android.material:material:1.2.0-alpha03"
|
||||
implementation "androidx.constraintlayout:constraintlayout:1.1.3"
|
||||
implementation "androidx.legacy:legacy-support-v4:1.0.0"
|
||||
testImplementation "junit:junit:4.12"
|
||||
|
|
|
@ -73,7 +73,6 @@ public class FileViewActivity extends AppCompatActivity {
|
|||
|
||||
TextView toolbar_title = findViewById(R.id.toolbar_title);
|
||||
toolbar_title.setMovementMethod(new ScrollingMovementMethod());
|
||||
toolbar_title.setText(singleFileName);
|
||||
|
||||
initCloseListener();
|
||||
closeActivity.setOnClickListener(onClickListener);
|
||||
|
@ -82,6 +81,7 @@ public class FileViewActivity extends AppCompatActivity {
|
|||
|
||||
singleFileName = URLDecoder.decode(singleFileName, "UTF-8");
|
||||
singleFileName = singleFileName.replaceAll("//", "/");
|
||||
singleFileName = singleFileName.startsWith("/") ? singleFileName.substring(1) : singleFileName;
|
||||
|
||||
}
|
||||
catch (UnsupportedEncodingException e) {
|
||||
|
@ -91,6 +91,8 @@ public class FileViewActivity extends AppCompatActivity {
|
|||
|
||||
}
|
||||
|
||||
toolbar_title.setText(singleFileName);
|
||||
|
||||
getSingleFileContents(instanceUrl, instanceToken, repoOwner, repoName, singleFileName);
|
||||
|
||||
}
|
||||
|
|
|
@ -140,6 +140,10 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
|
|||
|
||||
fileStructure.setText(breadcrumbBuilder);
|
||||
|
||||
String dirName_ = fileStructure.getText().toString();
|
||||
dirName_ = dirName_.startsWith("/") ? dirName_.substring(1) : dirName_;
|
||||
final String finalDirName_ = dirName_;
|
||||
|
||||
mBreadcrumbsView.addItem(createItem(dirName));
|
||||
mBreadcrumbsView.setCallback(new DefaultBreadcrumbsCallback<BreadcrumbItem>() {
|
||||
@Override
|
||||
|
@ -154,7 +158,7 @@ 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, fileStructure.getText().toString());
|
||||
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, finalDirName_);
|
||||
|
||||
}
|
||||
|
||||
|
@ -164,7 +168,7 @@ public class FilesFragment extends Fragment implements FilesAdapter.FilesAdapter
|
|||
}
|
||||
});
|
||||
|
||||
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, fileStructure.getText().toString());
|
||||
fetchDataAsyncSub(instanceUrl, Authorization.returnAuthentication(getContext(), loginUid, instanceToken), repoOwner, repoName, finalDirName_);
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue