Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Commit

Permalink
1.119
Browse files Browse the repository at this point in the history
  • Loading branch information
raulhaag committed Dec 7, 2019
1 parent 6adb03d commit 89dbc02
Show file tree
Hide file tree
Showing 62 changed files with 284 additions and 264 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Downloads

Changelog
---------
Cambios en v1.119:
* Pequeños fixes.

Changes on v1.119.
* Min fix.

Cambios en v1.118:
* Fix CFI.
* Agregada opcion de reiniciar al menu principal.
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "ar.rulosoft.mimanganu"
versionCode 118
versionName "1.118"
versionCode 119
versionName "1.119"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
minSdkVersion 15
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public View getView(int position, View convertView, ViewGroup parent) {
rowView = inflater.inflate(mResource, null);
// configure view holder
ViewHolder viewHolder = new ViewHolder();
viewHolder.object = (LinearLayout) rowView.findViewById(R.id.colorObject);
viewHolder.image = (ImageView) rowView.findViewById(R.id.color_icon);
viewHolder.text = (TextView) rowView.findViewById(R.id.colorText);
viewHolder.object = rowView.findViewById(R.id.colorObject);
viewHolder.image = rowView.findViewById(R.id.color_icon);
viewHolder.text = rowView.findViewById(R.id.colorText);
rowView.setTag(viewHolder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ public View getView(int position, View convertView, ViewGroup parent) {
rowView = inflater.inflate(this.mResource, null);
// configure view holder
ViewHolder viewHolder = new ViewHolder();
viewHolder.object = (LinearLayout) rowView.findViewById(R.id.dirObject);
viewHolder.image = (ImageView) rowView.findViewById(R.id.dirIcon);
viewHolder.text = (TextView) rowView.findViewById(R.id.dirText);
viewHolder.object = rowView.findViewById(R.id.dirObject);
viewHolder.image = rowView.findViewById(R.id.dirIcon);
viewHolder.text = rowView.findViewById(R.id.dirText);
rowView.setTag(viewHolder);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ public void setSummary(CharSequence summary) {
@Override
protected void onBindDialogView(@NonNull View view) {

mMessageValue = (TextView) view.findViewById(R.id.dialogText);
mMessageValue = view.findViewById(R.id.dialogText);
mMessageValue.setText(String.format(mSummary, mValue + mMin));

mNumberPicker = (NumberPicker) view.findViewById(R.id.dialogNumPicker);
mNumberPicker = view.findViewById(R.id.dialogNumPicker);
mNumberPicker.setOnScrollListener(new NumberPicker.OnScrollListener() {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public static PreferenceListDirFragment newInstance(Preference preference) {
protected void onBindDialogView(@NonNull View view) {
SharedPreferences pm = PreferenceManager.getDefaultSharedPreferences(getContext());
actual = pm.getString(parent.getKey(), Environment.getExternalStorageDirectory().getPath() + "/");
dirs = (ListView) view.findViewById(R.id.dirList);
dirs_path = (TextView) view.findViewById(R.id.dirBreadcrumb);
dirs = view.findViewById(R.id.dirList);
dirs_path = view.findViewById(R.id.dirBreadcrumb);
ArrayList<String> dirList = Util.getInstance().dirList(actual);
context = getActivity();
ArrayAdapter<String> adap = new ArrayAdapterDirectory(context, R.layout.listitem_dir, dirList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public SeekBarCustomPreferenceFloat(Context context, AttributeSet attrs, int def

@Override
protected Object onGetDefaultValue(TypedArray a, int index) {
return (a.getString(index));
return (a.getString(index));
}

@Override
Expand All @@ -77,12 +77,12 @@ public void onBindViewHolder(PreferenceViewHolder holder) {
SeekBar seekBar = (SeekBar) holder.findViewById(R.id.seekbar);
textSummary = (TextView) holder.findViewById(android.R.id.summary);
textSummary.setText(String.format(mSummary, mValue));
seekBar.setMax((int)mMax);
seekBar.setProgress(Math.round((mValue + mFC) / mStep) );
seekBar.setMax((int) mMax);
seekBar.setProgress(Math.round((mValue + mFC) / mStep));
seekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
mValue = (progress * mStep) - mFC ;
mValue = (progress * mStep) - mFC;
textSummary.setText(String.format(mSummary, mValue));
}

Expand Down
16 changes: 8 additions & 8 deletions app/src/main/java/ar/rulosoft/mimanganu/DetailsFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public void onClick(View v) {
set.playSequentially(anim2, anim1);
set.start();
} else {
Util.getInstance().showFastSnackBar(getString(R.string.already_on_db), getView(),getContext());
Util.getInstance().showFastSnackBar(getString(R.string.already_on_db), getView(), getContext());
}
}
});
Expand All @@ -138,7 +138,7 @@ public void onClick(View v) {
}
manga = new Manga(id, title, path, false);
manga.setImages(img);
data.enableTitleCopy(getActivity(),manga.getTitle());
data.enableTitleCopy(getActivity(), manga.getTitle());
serverBase = ServerBase.getServer(id, getContext());
imageLoader = new ImageLoader(getContext());
swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
Expand All @@ -159,7 +159,7 @@ public void run() {
@Override
public void onResume() {
super.onResume();
((MainActivity)getActivity()).enableHomeButton(true);
((MainActivity) getActivity()).enableHomeButton(true);
}

@Override
Expand Down Expand Up @@ -196,20 +196,20 @@ protected Void doInBackground(Void... params) {
@Override
protected void onPostExecute(Void v) {
String infoExtra = "";
if(isAdded()) {
if (isAdded()) {
if (error.isEmpty()) {
if (manga.isFinished()) {
infoExtra = infoExtra + getResources().getString(R.string.finalizado);
} else {
infoExtra = infoExtra + getResources().getString(R.string.en_progreso);
}
if(mangaAlreadyAdded)
if (mangaAlreadyAdded)
data.setStatus(infoExtra + " (" + getString(R.string.already_on_db) + ")");
else
data.setStatus(infoExtra);
String chapters = "";
if(manga.getChapters().size() > 0){
chapters = " (" + manga.getChapters().size() + " " + getString(R.string.chapters)+")";
if (manga.getChapters().size() > 0) {
chapters = " (" + manga.getChapters().size() + " " + getString(R.string.chapters) + ")";
}
data.setServer(serverBase.getServerName() + chapters);
if (manga.getAuthor() != null && manga.getAuthor().length() > 1) {
Expand All @@ -229,7 +229,7 @@ protected void onPostExecute(Void v) {
}
imageLoader.displayImg(manga.getImages(), data);
if (!error.isEmpty()) {
Util.getInstance().showFastSnackBar(error, getView(),getContext());
Util.getInstance().showFastSnackBar(error, getView(), getContext());
} else {
AnimatorSet set = new AnimatorSet();
ObjectAnimator anim1 = ObjectAnimator.ofFloat(floatingActionButton_add, "alpha", 0.0f, 1.0f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ public class DownloadsFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
setHasOptionsMenu(true);
return inflater.inflate(R.layout.fragment_downloads,container,false);
return inflater.inflate(R.layout.fragment_downloads, container, false);
}

@Override
public void onActivityCreated(Bundle savedInstanceState) {
super.onActivityCreated(savedInstanceState);
darkTheme = MainActivity.darkTheme;
list = (ListView) getView().findViewById(R.id.action_view_download);
list = getView().findViewById(R.id.action_view_download);
}

@Override
Expand Down Expand Up @@ -69,8 +69,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
public void onResume() {
super.onResume();
downloadAdapter = new DownloadAdapter(getActivity(), getActivity(), darkTheme);
((MainActivity)getActivity()).enableHomeButton(true);
((MainActivity)getActivity()).setTitle(getString(R.string.descargas));
((MainActivity) getActivity()).enableHomeButton(true);
((MainActivity) getActivity()).setTitle(getString(R.string.descargas));
list.setAdapter(downloadAdapter);
}

Expand Down
16 changes: 7 additions & 9 deletions app/src/main/java/ar/rulosoft/mimanganu/MangaFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void onActivityCreated(final Bundle savedInstanceState) {
} catch (Throwable throwable) {
throwable.printStackTrace();
}
}else {
} else {
mListView = getView().findViewById(R.id.list);
swipeReLayout = getView().findViewById(R.id.str);
readerOptions = getView().findViewById(R.id.reader_options);
Expand Down Expand Up @@ -270,13 +270,12 @@ public void onItemCheckedStateChanged(

public void loadInfo(Manga manga) {
if (mInfo != null && manga != null && isAdded()) {
mInfo.setStatus(manga.isFinished()?getResources().getString(R.string.finalizado):getResources().getString(R.string.en_progreso));
mInfo.setStatus(manga.isFinished() ? getResources().getString(R.string.finalizado) : getResources().getString(R.string.en_progreso));
mInfo.setServer(ServerBase.getServer(manga.getServerId(), getContext()).getServerName());

if (manga.getSynopsis() != null) {
mInfo.setSynopsis(manga.getSynopsis());
}
else {
} else {
mInfo.setSynopsis(getResources().getString(R.string.nodisponible));
}
if (manga.getAuthor() != null) {
Expand All @@ -289,10 +288,9 @@ public void loadInfo(Manga manga) {
} else {
mInfo.setGenre(getResources().getString(R.string.nodisponible));
}
if (manga.getLastUpdate()!= null) {
if (manga.getLastUpdate() != null) {
mInfo.setLastUpdate(manga.getLastUpdate());
}
else {
} else {
mInfo.setLastUpdate(getResources().getString(R.string.nodisponible));
}
mImageLoader.displayImg(manga.getImages(), mInfo);
Expand Down Expand Up @@ -555,7 +553,7 @@ public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {

@Override
public boolean onBackPressed() {
if(readerOptions.isVisible()){
if (readerOptions.isVisible()) {
readerOptions.switchOptions();
return true;
}
Expand Down Expand Up @@ -731,7 +729,7 @@ private class SortAndLoadChapters extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... params) {
String condition = "1";
if(hide_read) {
if (hide_read) {
condition = Database.COL_CAP_STATE + " != 1";
}
chapters = Database.getChapters(getActivity(), mMangaId, condition);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
formUri = "https://collector.tracepot.com/3928c326"
)*/
public class MiMangaNuApplication extends Application {
public MiMangaNuApplication(){
public MiMangaNuApplication() {
}

@Override
Expand All @@ -27,12 +27,13 @@ protected void attachBaseContext(Context base) {
// ACRA.init(this);
}

@Override public void onCreate() {
@Override
public void onCreate() {
super.onCreate();
// don't delete this, this is used to detect memory leaks ~xtj9182
//LeakCanary.install(this);
JobManager.create(this).addJobCreator(new UpdateJobCreator());
if(JobManager.instance().getAllJobRequestsForTag(UpdateJobCreator.UPDATE_TAG).isEmpty()){
if (JobManager.instance().getAllJobRequestsForTag(UpdateJobCreator.UPDATE_TAG).isEmpty()) {
UpdateJobCreator.UpdateJob.scheduleJob(getApplicationContext());
}
Util.createNotificationChannels(getApplicationContext());
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/ar/rulosoft/mimanganu/ReaderFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ private void setReader() {
loadChapter(mChapter, LoadMode.SAVED);
}

if(pm.getBoolean(BLUE_FILTER_CHECK, false)){
mReader.setBlueFilter((100 - pm.getInt(BLUE_FILTER_LEVEL, 30))/100f);
if (pm.getBoolean(BLUE_FILTER_CHECK, false)) {
mReader.setBlueFilter((100 - pm.getInt(BLUE_FILTER_LEVEL, 30)) / 100f);
}
}

Expand Down Expand Up @@ -481,7 +481,7 @@ public boolean onKeyUp(int keyCode, KeyEvent event) {

@Override
public boolean onBackPressed() {
if(readerOptions.isVisible()){
if (readerOptions.isVisible()) {
readerOptions.switchOptions();
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public void onActivityCreated(Bundle savedState) {
super.onActivityCreated(savedState);
serverId = getArguments().getInt(MainFragment.SERVER_ID);
search_term = getArguments().getString(TERM);
list = (ListView) getView().findViewById(R.id.result);
loading = (ProgressBar) getView().findViewById(R.id.loading);
list = getView().findViewById(R.id.result);
loading = getView().findViewById(R.id.loading);
list.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void onItemClick(AdapterView<?> parent, View view, int position, long id)
public void onResume() {
super.onResume();
((MainActivity) getActivity()).setTitle(getResources().getString(R.string.listaen) + " " + serverBase.getServerName());
((MainActivity)getActivity()).enableHomeButton(true);
((MainActivity) getActivity()).enableHomeButton(true);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ public static class ViewHolder {
private ImageButton buttonImageView;

public ViewHolder(View v, boolean darkTheme) {
this.textViewName = (TextView) v.findViewById(R.id.nombre);
this.buttonImageView = (ImageButton) v.findViewById(R.id.boton);
this.loadingProgressBar = (ProgressBar) v.findViewById(R.id.progreso);
this.textViewName = v.findViewById(R.id.nombre);
this.buttonImageView = v.findViewById(R.id.boton);
this.loadingProgressBar = v.findViewById(R.id.progreso);
if (darkTheme)
this.buttonImageView.setImageResource(R.drawable.ic_action_x_dark);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package ar.rulosoft.mimanganu.adapters;

import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import java.util.ArrayList;

import ar.rulosoft.mimanganu.R;
import ar.rulosoft.mimanganu.componentes.Manga;

/**
* Created by Raul on 30/11/2015.
*
*/
public abstract class MangaRecAdapterBase extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
protected ArrayList<Manga> mangas;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@

/**
* Created by Raul on 30/11/2015.
*
*/
public class MangasRecAdapterText extends MangaRecAdapterBase {

public MangasRecAdapterText(ArrayList<Manga> list, Context context) {
super(list,context);
super(list, context);
}

@Override
Expand All @@ -33,7 +32,7 @@ public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewT
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
final Manga m = mangas.get(position);
MangasHolder mHolder = (MangasHolder)holder;
MangasHolder mHolder = (MangasHolder) holder;
mHolder.title.setText(m.getTitle());
mHolder.v.setTag(position);
mHolder.v.setOnClickListener(new View.OnClickListener() {
Expand All @@ -54,7 +53,7 @@ public class MangasHolder extends RecyclerView.ViewHolder {

public MangasHolder(View itemView) {
super(itemView);
title = itemView.findViewById(R.id.manga_title);
title = itemView.findViewById(R.id.manga_title);
v = itemView;
}
}
Expand Down
Loading

0 comments on commit 89dbc02

Please sign in to comment.