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

Commit

Permalink
Bug fixes and getting ready for release
Browse files Browse the repository at this point in the history
  • Loading branch information
SlideCI committed Nov 7, 2015
1 parent 16a81bc commit 6dd0ecc
Show file tree
Hide file tree
Showing 35 changed files with 133 additions and 75 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ android {

defaultConfig {
applicationId "me.ccrama.redditslide"
minSdkVersion 16
minSdkVersion 19
targetSdkVersion 23
versionCode 73
versionName "4.2.5.5"
versionCode 75
versionName "4.3"
multiDexEnabled = true

}
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/me/ccrama/redditslide/Activities/Album.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.widget.RecyclerView;
Expand All @@ -24,6 +25,7 @@
import me.ccrama.redditslide.ColorPreferences;
import me.ccrama.redditslide.R;
import me.ccrama.redditslide.Views.PreCachingLayoutManager;
import me.ccrama.redditslide.Views.ToolbarColorizeHelper;


/**
Expand Down Expand Up @@ -55,6 +57,7 @@ public void onCreate(Bundle savedInstanceState) {

final Toolbar b = (Toolbar) findViewById(R.id.toolbar);
b.setTitle(R.string.album_loading);
ToolbarColorizeHelper.colorizeToolbar(b, Color.WHITE, this);
setSupportActionBar(b);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.app.ActivityManager;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.BitmapDrawable;
import android.os.AsyncTask;
Expand Down Expand Up @@ -52,6 +53,7 @@
import me.ccrama.redditslide.ColorPreferences;
import me.ccrama.redditslide.R;
import me.ccrama.redditslide.SubredditStorage;
import me.ccrama.redditslide.Views.ToolbarColorizeHelper;
import me.ccrama.redditslide.Visuals.FontPreferences;
import me.ccrama.redditslide.Visuals.Pallete;

Expand All @@ -71,7 +73,10 @@ protected void onCreate(Bundle savedInstanceState) {
getTheme().applyStyle(new ColorPreferences(this).getFontStyle().getBaseId(), true);
setContentView(R.layout.activity_createmulti);
final Toolbar b = (Toolbar) findViewById(R.id.toolbar);

b.setBackgroundColor(Pallete.getDefaultColor());
ToolbarColorizeHelper.colorizeToolbar(b, Color.WHITE, this);

findViewById(R.id.add).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.afollestad.materialdialogs.AlertDialogWrapper;
import com.koushikdutta.ion.Ion;
import com.rey.material.widget.Slider;

import net.dean.jraw.managers.AccountManager;
import net.dean.jraw.models.Submission;
import net.dean.jraw.models.Subreddit;
import net.dean.jraw.paginators.Sorting;
import net.dean.jraw.paginators.TimePeriod;
Expand All @@ -70,7 +67,6 @@
import me.ccrama.redditslide.SubredditInputFilter;
import me.ccrama.redditslide.SubredditStorage;
import me.ccrama.redditslide.SubredditStorageNoContext;
import me.ccrama.redditslide.TimeUtils;
import me.ccrama.redditslide.Views.MakeTextviewClickable;
import me.ccrama.redditslide.Views.ToastHelpCreation;
import me.ccrama.redditslide.Visuals.FontPreferences;
Expand Down Expand Up @@ -228,7 +224,7 @@ public void onCreate(Bundle savedInstance) {
if (getIntent() != null && getIntent().hasExtra("pageTo"))
toGoto = getIntent().getIntExtra("pageTo", 0);

if (DataShare.notifs != null) {
/*if (DataShare.notifs != null) {
final Submission s = DataShare.notifs;
LayoutInflater inflater = getLayoutInflater();
Expand Down Expand Up @@ -272,7 +268,7 @@ public void onCancel(DialogInterface dialog) {
dialog.dismiss();
}
});
}
}*/
if (!Reddit.colors.getBoolean("Tutorial", false)) {
Intent i = new Intent(SubredditOverview.this, Tutorial.class);
startActivity(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,13 @@
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.afollestad.materialdialogs.AlertDialogWrapper;
import com.koushikdutta.ion.Ion;
import com.rey.material.widget.Slider;

import net.dean.jraw.managers.AccountManager;
import net.dean.jraw.models.Submission;
import net.dean.jraw.models.Subreddit;
import net.dean.jraw.paginators.Sorting;
import net.dean.jraw.paginators.TimePeriod;
Expand All @@ -68,7 +65,6 @@
import me.ccrama.redditslide.SubredditInputFilter;
import me.ccrama.redditslide.SubredditStorage;
import me.ccrama.redditslide.SubredditStorageNoContext;
import me.ccrama.redditslide.TimeUtils;
import me.ccrama.redditslide.Views.MakeTextviewClickable;
import me.ccrama.redditslide.Views.NoSwipingViewPager;
import me.ccrama.redditslide.Views.ToastHelpCreation;
Expand Down Expand Up @@ -184,7 +180,7 @@ public void onCreate(Bundle savedInstance) {
setContentView(R.layout.activity_overview_single);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar.setTitle("Slide");
if (DataShare.notifs != null) {
/* if (DataShare.notifs != null) {
final Submission s = DataShare.notifs;
LayoutInflater inflater = getLayoutInflater();
Expand Down Expand Up @@ -228,7 +224,7 @@ public void onCancel(DialogInterface dialog) {
dialog.dismiss();
}
});
}
}*/
if (!Reddit.colors.getBoolean("Tutorial", false)) {
Intent i = new Intent(SubredditOverviewSingle.this, Tutorial.class);
startActivity(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ protected ArrayList<Submission> doInBackground(String... subredditPaginators) {
paginator.setSorting(Reddit.defaultSorting);
paginator.setTimePeriod(Reddit.timePeriod);
}
if (paginator.hasNext()) {
if (paginator != null && paginator.hasNext()) {
if (reset) {
posts = new ArrayList<>();
for (Submission c : paginator.next()) {
Submission s = c;
try {
for (Submission c : paginator.next()) {
Submission s = c;
if (Hidden.isHidden(s)) {
if (SettingValues.NSFWPosts && s.isNsfw()) {
posts.add(s);
Expand All @@ -123,11 +124,15 @@ protected ArrayList<Submission> doInBackground(String... subredditPaginators) {
}
}

}
} catch(Exception ignored){
//gets caught above
}
} else {
if(posts == null)
posts = new ArrayList<>();

try{
for (Submission c : paginator.next()) {
Submission s = c;
if (Hidden.isHidden(s)) {
Expand All @@ -139,6 +144,9 @@ protected ArrayList<Submission> doInBackground(String... subredditPaginators) {
}

}
} catch(Exception ignored){
//gets caught above
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/me/ccrama/redditslide/DataShare.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
public class DataShare {
public static ArrayList<Submission> sharedSubreddit;
public static Submission sharedSubmission;
public static Submission notifs;
// public static Submission notifs;
public static PrivateMessage sharedMessage;
public static ArrayList<CommentObject> sharedComments;
public static String subAuthor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public void onClick(View v) {

comments = new SubmissionComments(fullname, CommentPage.this, mSwipeRefreshLayout);

loadMore = false;
v.findViewById(R.id.loadall).setVisibility(View.GONE);

}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public OpenRedditLink(Context c, String url){
url = url.replace("www.","");
url = url.replace("http://", "");
url = url.replace("https://", "");
url = url.substring(url.indexOf("redd"), url.length());

if(url.startsWith("/")){
url = "reddit.com" + url;
Expand Down
13 changes: 6 additions & 7 deletions app/src/main/java/me/ccrama/redditslide/SubredditStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import net.dean.jraw.ApiException;
import net.dean.jraw.managers.MultiRedditManager;
import net.dean.jraw.models.MultiReddit;
import net.dean.jraw.paginators.SubredditPaginator;
import net.dean.jraw.paginators.UserSubredditsPaginator;

import java.util.ArrayList;
Expand Down Expand Up @@ -131,10 +130,10 @@ public void run() {
test.remove("");
}
subredditsForHome = test;
DataShare.notifs = new SubredditPaginator(Authentication.reddit, "slideforredditnotifs" ).next().get(0);
if(Reddit.hidden.contains(DataShare.notifs.getFullName())){
DataShare.notifs = null;
}
// DataShare.notifs = new SubredditPaginator(Authentication.reddit, "slideforredditnotifs" ).next().get(0);
// if(Reddit.hidden.contains(DataShare.notifs.getFullName())){
// DataShare.notifs = null;
// }

alphabeticalSubscriptions = sort(new ArrayList<>(test));
if(params[0].loader != null) {
Expand Down Expand Up @@ -194,10 +193,10 @@ public void run() {
test.remove("");
}
subredditsForHome = test;
DataShare.notifs = new SubredditPaginator(Authentication.reddit, "slideforredditnotifs" ).next().get(0);
/* DataShare.notifs = new SubredditPaginator(Authentication.reddit, "slideforredditnotifs" ).next().get(0);
if(Reddit.hidden.contains(DataShare.notifs.getFullName())){
DataShare.notifs = null;
}
}*/

alphabeticalSubscriptions = sort(new ArrayList<>(test));
if(params[0].loader != null) {
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/res/layout-v21/activity_multireddits.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
android:layout_height="match_parent">


<android.support.design.widget.AppBarLayout
<android.support.design.widget.AppBarLayout
android:theme="@style/Theme.AppCompat"
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -50,7 +51,7 @@
android:scaleType="fitCenter"

android:src="@drawable/sort"
android:tint="?android:attr/textColorPrimary"

/>
<ImageView
android:id="@+id/edit"
Expand All @@ -65,7 +66,7 @@
android:scaleType="fitCenter"

android:src="@drawable/edit"
android:tint="?android:attr/textColorPrimary"

/>


Expand All @@ -82,8 +83,9 @@

android:scaleType="fitCenter"

android:tint="@color/white"
android:src="@drawable/add_plain"
android:tint="?android:attr/textColorPrimary"

/>


Expand Down
12 changes: 8 additions & 4 deletions app/src/main/res/layout-v21/activity_overview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/orange"
android:theme="@style/Theme.AppCompat"

android:elevation="16dp"
android:orientation="vertical">

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_width="match_parent"
android:layout_height="wrap_content"

android:background="#00000000"
android:clipToPadding="false"
android:minHeight="56dp"
Expand All @@ -46,7 +49,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="end|center_vertical"
android:tint="?android:attr/textColorPrimary"


android:background="?android:selectableItemBackgroundBorderless"
android:paddingBottom="12dp"
Expand All @@ -66,7 +69,7 @@
android:background="?android:selectableItemBackgroundBorderless"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:tint="?android:attr/textColorPrimary"


android:scaleType="fitCenter"
android:src="@drawable/infonew" />
Expand All @@ -77,7 +80,7 @@
android:id="@+id/grid"
android:layout_width="48dp"
android:background="?android:selectableItemBackgroundBorderless"
android:tint="?android:attr/textColorPrimary"


android:layout_height="48dp"
android:layout_gravity="end|center_vertical"
Expand All @@ -89,6 +92,7 @@

<android.support.design.widget.TabLayout
android:id="@+id/sliding_tabs"

android:layout_width="match_parent"

android:layout_height="wrap_content"
Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout-v21/activity_overview_single.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
>


<android.support.design.widget.AppBarLayout
<android.support.design.widget.AppBarLayout
android:theme="@style/Theme.AppCompat"
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down Expand Up @@ -46,7 +47,7 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="end|center_vertical"
android:tint="?android:attr/textColorPrimary"


android:background="?android:selectableItemBackgroundBorderless"
android:paddingBottom="12dp"
Expand All @@ -66,7 +67,7 @@
android:background="?android:selectableItemBackgroundBorderless"
android:paddingBottom="12dp"
android:paddingTop="12dp"
android:tint="?android:attr/textColorPrimary"


android:scaleType="fitCenter"
android:src="@drawable/infonew" />
Expand All @@ -77,7 +78,7 @@
android:id="@+id/grid"
android:layout_width="48dp"
android:background="?android:selectableItemBackgroundBorderless"
android:tint="?android:attr/textColorPrimary"


android:layout_height="48dp"
android:layout_gravity="end|center_vertical"
Expand Down
Loading

0 comments on commit 6dd0ecc

Please sign in to comment.