Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Commit

Permalink
Merge pull request #45 from Doomsdayrs/development
Browse files Browse the repository at this point in the history
Merging for newest release
  • Loading branch information
Doomsdayrs authored Sep 7, 2019
2 parents a170f1e + e2cd384 commit f198501
Show file tree
Hide file tree
Showing 109 changed files with 3,596 additions and 1,947 deletions.
875 changes: 674 additions & 201 deletions LICENSE

Large diffs are not rendered by default.

6 changes: 0 additions & 6 deletions NOTICE

This file was deleted.

19 changes: 12 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.github.doomsdayrs.apps.shosetsu"
minSdkVersion 22
targetSdkVersion 29
versionCode 19
versionName "v1.2.0-alpha"
versionCode 20
versionName "v0.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
Expand Down Expand Up @@ -41,22 +41,26 @@ android {

repositories {
mavenCentral()
maven {
url "https://maven.mozilla.org/maven2"
}
}

dependencies {
implementation 'com.google.android.material:material:1.1.0-alpha09'
implementation 'com.graphql-java:graphql-java:2019-08-01T04-03-44-e9b53f6'
implementation 'com.google.android.material:material:1.1.0-alpha10'
implementation 'com.graphql-java:graphql-java:2019-08-20T01-08-54-018b57c'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
//noinspection GradleCompatible
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha10'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.gridlayout:gridlayout:1.0.0'

implementation 'com.github.Doomsdayrs:novelreader-extensions:1.1.9'
implementation 'com.github.Doomsdayrs:novelreader-services:1.1.3'
implementation 'com.github.Doomsdayrs:shosetsu-extensions:0.1.1'
implementation 'com.github.Doomsdayrs:shosetsu-services:v0.1.1'
implementation 'com.github.Doomsdayrs:novelreader-services:1.1.4'

implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'org.jetbrains:annotations:17.0.0'
Expand All @@ -66,4 +70,5 @@ dependencies {
implementation 'com.github.javiersantos:AppUpdater:2.7'
implementation 'us.feras.mdv:markdownview:1.1.0'
implementation 'joda-time:joda-time:2.10.3'
implementation "org.mozilla.components:feature-readerview:1.0.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,20 @@
import static com.github.doomsdayrs.apps.shosetsu.backend.Utilities.shoDir;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* This file is part of Shosetsu.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Shosetsu is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* Shosetsu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Shosetsu. If not, see <https://www.gnu.org/licenses/>.
* ====================================================================
* Shosetsu
* 16 / 06 / 2019
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
package com.github.doomsdayrs.apps.shosetsu.backend;

import android.content.Context;
import android.os.AsyncTask;

import com.github.doomsdayrs.apps.shosetsu.ui.updates.async.ChapterUpdater;
import com.github.doomsdayrs.apps.shosetsu.variables.recycleObjects.NovelCard;

import java.util.ArrayList;

/*
* This file is part of Shosetsu.
*
* Shosetsu is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Shosetsu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Shosetsu. If not, see <https://www.gnu.org/licenses/>.
* ====================================================================
* Shosetsu
* 16 / 06 / 2019
*
* @author github.com/doomsdayrs
*/
public class Update_Manager {
private static ChapterUpdater chapterUpdater = null;

public static void init(ArrayList<NovelCard> novelCards, Context context) {
if (chapterUpdater == null) {
chapterUpdater = new ChapterUpdater(novelCards, context);
chapterUpdater.execute();
} else {
if (chapterUpdater.isCancelled() || chapterUpdater.getStatus().equals(AsyncTask.Status.FINISHED)) {
chapterUpdater = new ChapterUpdater(novelCards, context);
chapterUpdater.execute();
}
if (chapterUpdater.getStatus().equals(AsyncTask.Status.PENDING))
chapterUpdater.execute();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import android.net.NetworkInfo;
import android.net.Uri;
import android.util.DisplayMetrics;
import android.util.Log;

import com.github.Doomsdayrs.api.novelreader_core.services.core.objects.NovelChapter;
import com.github.Doomsdayrs.api.shosetsu.services.core.objects.NovelChapter;
import com.github.doomsdayrs.apps.shosetsu.R;
import com.github.doomsdayrs.apps.shosetsu.backend.database.Database;
import com.github.doomsdayrs.apps.shosetsu.ui.novel.StaticNovel;
import com.github.doomsdayrs.apps.shosetsu.ui.reader.ChapterReader;
import com.github.doomsdayrs.apps.shosetsu.ui.webView.Actions;
import com.github.doomsdayrs.apps.shosetsu.ui.webView.WebViewApp;
Expand All @@ -22,29 +22,30 @@

import org.jetbrains.annotations.NotNull;

import java.util.concurrent.TimeUnit;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* This file is part of Shosetsu.
*
* Shosetsu is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Shosetsu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* You should have received a copy of the GNU General Public License
* along with Shosetsu. If not, see <https://www.gnu.org/licenses/>.
* ====================================================================
* shosetsu
* 26 / 07 / 2019
*
* @author github.com/doomsdayrs
*/public class Utilities {
*/
public class Utilities {

public static final int SELECTED_STROKE_WIDTH = 8;
public static String shoDir = "/Shosetsu/";
Expand Down Expand Up @@ -233,13 +234,13 @@ public static void setTextSize(int size) {
.apply();
}

public static void openChapter(Activity activity, NovelChapter novelChapter) {
public static void openChapter(Activity activity, NovelChapter novelChapter, String nurl, int formatterID) {
Database.DatabaseChapter.setChapterStatus(novelChapter.link, Status.READING);
Intent intent = new Intent(activity, ChapterReader.class);
intent.putExtra("title", novelChapter.chapterNum);
intent.putExtra("chapterURL", novelChapter.link);
intent.putExtra("novelURL", StaticNovel.novelURL);
intent.putExtra("formatter", StaticNovel.formatter.getID());
intent.putExtra("novelURL", nurl);
intent.putExtra("formatter", formatterID);
activity.startActivity(intent);
}

Expand All @@ -255,6 +256,21 @@ public static void openInBrowser(@NotNull Activity activity, @NotNull String url
activity.startActivity(intent);
}


/**
* Freezes the thread for x time
*
* @param time time in MS
*/
public static void wait(int time) {
try {
TimeUnit.MILLISECONDS.sleep(time);
} catch (InterruptedException e) {
if (e.getMessage() != null)
Log.e("Error", e.getMessage());
}
}

//TODO Online Trackers
//Methods below when tracking system setup

Expand All @@ -266,4 +282,5 @@ public static boolean isTrackingEnabled() {
@SuppressWarnings({"EmptyMethod", "unused"})
public static void addTracker() {
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,20 @@
import okhttp3.HttpUrl;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* This file is part of Shosetsu.
*
* http://www.apache.org/licenses/LICENSE-2.0
* Shosetsu is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* Shosetsu is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Shosetsu. If not, see <https://www.gnu.org/licenses/>.
* ====================================================================
* shosetsu
* 01 / 08 / 2019
Expand Down

This file was deleted.

Loading

0 comments on commit f198501

Please sign in to comment.