Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
Some bug fixes, Update version number
Browse files Browse the repository at this point in the history
  • Loading branch information
SlideCI committed May 2, 2016
1 parent 4118a3c commit ee1f3ba
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 33 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
defaultConfig {
applicationId "me.ccrama.redditslide"
targetSdkVersion 23
versionCode 195
versionCode 196
multiDexEnabled = true
versionName androidGitVersion.name()
}
Expand All @@ -37,7 +37,7 @@ android {
// to pre-dex each module and produce an APK that can be used
// without time consuming dex merging processes.
dimension "api"
minSdkVersion 17
minSdkVersion 21
}
prod {
// The actual minSdkVersion for the application.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void onPageScrolled(int position, float positionOffset, int positionOffse

@Override
public void onPageSelected(int position) {
if (position != firstPage) {
if (position != firstPage && position < subredditPosts.getPosts().size()) {
position = position - 1;
updateSubredditAndSubmission(subredditPosts.getPosts().get(position));

Expand Down
68 changes: 40 additions & 28 deletions app/src/main/java/me/ccrama/redditslide/Activities/MediaView.java
Original file line number Diff line number Diff line change
Expand Up @@ -767,20 +767,26 @@ public void onClick(View v2) {

public void showFirstDialog() {
try {
new AlertDialogWrapper.Builder(this)
.setTitle(R.string.set_save_location)
.setMessage(R.string.set_save_location_msg)
.setPositiveButton(R.string.btn_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
new FolderChooserDialogCreate.Builder(MediaView.this)
.chooseButton(R.string.btn_select) // changes label of the choose button
.initialPath(Environment.getExternalStorageDirectory().getPath()) // changes initial path, defaults to external storage directory
.show();
}
})
.setNegativeButton(R.string.btn_no, null)
.show();
runOnUiThread(new Runnable() {
@Override
public void run() {
new AlertDialogWrapper.Builder(MediaView.this)
.setTitle(R.string.set_save_location)
.setMessage(R.string.set_save_location_msg)
.setPositiveButton(R.string.btn_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
new FolderChooserDialogCreate.Builder(MediaView.this)
.chooseButton(R.string.btn_select) // changes label of the choose button
.initialPath(Environment.getExternalStorageDirectory().getPath()) // changes initial path, defaults to external storage directory
.show();
}
})
.setNegativeButton(R.string.btn_no, null)
.show();
}
});

} catch (Exception ignored) {

}
Expand Down Expand Up @@ -811,20 +817,26 @@ public void onScanCompleted(String path, Uri uri) {
}

public void showErrorDialog() {
new AlertDialogWrapper.Builder(MediaView.this)
.setTitle(R.string.err_something_wrong)
.setMessage(R.string.err_couldnt_save_choose_new)
.setPositiveButton(R.string.btn_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
new FolderChooserDialogCreate.Builder(MediaView.this)
.chooseButton(R.string.btn_select) // changes label of the choose button
.initialPath(Environment.getExternalStorageDirectory().getPath()) // changes initial path, defaults to external storage directory
.show();
}
})
.setNegativeButton(R.string.btn_no, null)
.show();
runOnUiThread(new Runnable() {
@Override
public void run() {
new AlertDialogWrapper.Builder(MediaView.this)
.setTitle(R.string.err_something_wrong)
.setMessage(R.string.err_couldnt_save_choose_new)
.setPositiveButton(R.string.btn_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
new FolderChooserDialogCreate.Builder(MediaView.this)
.chooseButton(R.string.btn_select) // changes label of the choose button
.initialPath(Environment.getExternalStorageDirectory().getPath()) // changes initial path, defaults to external storage directory
.show();
}
})
.setNegativeButton(R.string.btn_no, null)
.show();
}
});

}

private void shareImage(String finalUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2404,7 +2404,7 @@ public void onPostExecute(Integer data) {
currentPos = holderPos;
toShiftTo = ((LinearLayoutManager) listView.getLayoutManager()).findLastVisibleItemPosition();
shiftFrom = ((LinearLayoutManager) listView.getLayoutManager()).findFirstVisibleItemPosition();
} else {
} else if( users.get(dataPos) instanceof MoreChildItem){
final MoreChildItem baseNode = (MoreChildItem) users.get(dataPos);
if (baseNode.children.getCount() > 0) {
holder.content.setText(mContext.getString(R.string.comment_load_more, baseNode.children.getCount()));
Expand All @@ -2414,7 +2414,6 @@ public void onPostExecute(Integer data) {
holder.content.setText(R.string.thread_continue);
}
holder.loading.setVisibility(View.GONE);

}
}

Expand Down

0 comments on commit ee1f3ba

Please sign in to comment.