Skip to content

Commit

Permalink
Merge pull request #17 from ranobe-org/feat/fdroid-updates
Browse files Browse the repository at this point in the history
Removed In-app updater
  • Loading branch information
AP-Atul committed Feb 18, 2023
2 parents e122063 + f86c843 commit 9a3d904
Show file tree
Hide file tree
Showing 13 changed files with 29 additions and 222 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h2><samp>R.A.N.O.B.E</samp></h2>
<samp>A simple extensible light novel reader</samp>
<br/><br/>
<a href="https://github.com/ranobe-org/ranobe/releases/download/v0.0.4/ranobe.apk" title="Download">
<a href="https://github.com/ranobe-org/ranobe/releases/download/v0.0.5/ranobe.apk" title="Download">
<img height='30' src="https://img.shields.io/badge/download-2da44e?style=flat&logo=android&logoColor=white" alt="Download" title="Download">
</a>
<a href="https://apt.izzysoft.de/fdroid/index/apk/org.ranobe.ranobe" title="Download from Izzydroid">
Expand Down Expand Up @@ -77,3 +77,8 @@
- [ ] backup data, migrations
- [ ] novel updates
- [ ] animations

### Disclaimer

The developers of this application does not have any affiliation with the content available
in the app. It is collecting from the sources freely available through any web browser.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.ranobe.ranobe"
minSdk 21
targetSdk 33
versionCode 4
versionName "v0.0.4"
versionCode 5
versionName "v0.0.5"
}

buildTypes {
Expand Down
71 changes: 0 additions & 71 deletions app/src/main/java/org/ranobe/ranobe/repository/GithubRepo.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private void navigateToChapterList() {
NavController controller = Navigation.findNavController(requireActivity(), R.id.nav_host_fragment_content_main);
Bundle bundle = new Bundle();
bundle.putString("novel", novelUrl);
controller.navigate(R.id.chapters_fragment, bundle);
controller.navigate(R.id.details_fragment_to_chapters, bundle);
}

private void setupUi(Novel novel) {
Expand Down
21 changes: 0 additions & 21 deletions app/src/main/java/org/ranobe/ranobe/ui/settings/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,18 @@
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatDelegate;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;

import org.ranobe.ranobe.R;
import org.ranobe.ranobe.config.Ranobe;
import org.ranobe.ranobe.databinding.FragmentSettingsBinding;
import org.ranobe.ranobe.repository.GithubRepo;
import org.ranobe.ranobe.ui.settings.viewmodel.SettingsViewModel;

public class Settings extends Fragment {

private FragmentSettingsBinding binding;
private SettingsViewModel viewModel;

public Settings() {
}

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewModel = new ViewModelProvider(requireActivity()).get(SettingsViewModel.class);
}

@Override
public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
Expand All @@ -48,20 +38,9 @@ public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,

setCurrentThemeMode();

viewModel.getUpdate().observe(requireActivity(), this::release);
viewModel.checkForUpdate();

return binding.getRoot();
}

private void release(GithubRepo.GithubRelease release) {
if (release.updateAvailable) {
binding.updateCard.setVisibility(View.VISIBLE);
binding.versionString.setText(release.newReleaseVersion);
binding.getUpdate.setOnClickListener(v -> openLink(release.newReleaseUrl));
}
}

private void setCurrentThemeMode() {
int mode = Ranobe.getThemeMode(requireActivity().getApplicationContext());
if (mode == AppCompatDelegate.MODE_NIGHT_NO)
Expand Down

This file was deleted.

47 changes: 0 additions & 47 deletions app/src/main/java/org/ranobe/ranobe/util/Version.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class SettingOptionView extends LinearLayout {
public SettingOptionView(Context context, @Nullable AttributeSet attrs) {
super(context, attrs);
binding = ViewSettingOptionBinding.inflate(LayoutInflater.from(context), this, true);
TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.SettingOptionView, 0, 0);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.SettingOptionView, 0, 0);

try {
int icon = a.getResourceId(R.styleable.SettingOptionView_settingIcon, R.drawable.ic_settings);
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/fragment_details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,15 @@
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:padding="10dp"
android:textColor="?colorOnSurface" />
android:textAppearance="@style/TextAppearance.Material3.BodyMedium" />

<Button
android:id="@+id/chapter_info"
style="@style/Widget.Material3.Button.TonalButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/summary"
android:textIsSelectable="true"
android:layout_alignParentEnd="true"
android:layout_margin="10dp"
android:layout_marginBottom="50dp"
Expand Down
36 changes: 0 additions & 36 deletions app/src/main/res/layout/fragment_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,6 @@
android:orientation="vertical"
android:padding="10dp">

<com.google.android.material.card.MaterialCardView
android:id="@+id/update_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:visibility="gone">

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="15dp">

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/new_version_available"
android:textColor="?colorOnSurface"
android:textSize="@dimen/text_med" />

<TextView
android:id="@+id/version_string"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<com.google.android.material.button.MaterialButton
android:id="@+id/get_update"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:text="@string/update" />

</LinearLayout>

</com.google.android.material.card.MaterialCardView>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
Expand Down
21 changes: 16 additions & 5 deletions app/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@
android:id="@+id/browse_fragment"
android:name="org.ranobe.ranobe.ui.browse.Browse"
android:label="fragment_browse"
tools:layout="@layout/fragment_browse" />
tools:layout="@layout/fragment_browse">
<action
android:id="@+id/browse_fragment_to_details"
app:destination="@id/details_fragment" />
</fragment>

<fragment
android:id="@+id/search_fragment"
android:name="org.ranobe.ranobe.ui.search.Search"
android:label="fragment_search"
tools:layout="@layout/fragment_search" />
tools:layout="@layout/fragment_search">
<action
android:id="@+id/search_fragment_to_details"
app:destination="@id/details_fragment" />
</fragment>

<fragment
android:id="@+id/explore_fragment"
Expand All @@ -33,7 +41,11 @@
android:id="@+id/details_fragment"
android:name="org.ranobe.ranobe.ui.details.Details"
android:label="fragment_details"
tools:layout="@layout/fragment_details" />
tools:layout="@layout/fragment_details">
<action
android:id="@+id/details_fragment_to_chapters"
app:destination="@id/chapters_fragment" />
</fragment>

<fragment
android:id="@+id/chapters_fragment"
Expand All @@ -47,5 +59,4 @@
android:label="fragment_error"
tools:layout="@layout/fragment_error" />


</navigation>
</navigation>
2 changes: 0 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@
<string name="currently_active">Currently active</string>
<string name="info">INFO</string>
<string name="mp_lite_subtitle">an open source music player from same dev</string>
<string name="new_version_available">A new version of the app is available</string>
<string name="update">Update</string>

</resources>
4 changes: 1 addition & 3 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ Features
- Multi-lingual sources
- English
- Russian
- More to come ;)
- Searching with keywords
- Chapter Search and Sort
- Continuous Vertical Reading
- Light and Dark modes
- Customize reading experience
- Change font size
- Change background and font color

0 comments on commit 9a3d904

Please sign in to comment.