10 Commits

Author SHA1 Message Date
Balazs Toldi
6ff46f928a Bump version 2023-10-24 20:37:17 +02:00
Balazs Toldi
81e1c73c65 Fix the updating part of the community saving
In a previous commit, I've added a code snippet that made an update query for each fetched summary that is already in the internal database. However, it did not take in to account that the same community can be related to different accounts. This commit fixes this issue by adding an additional filter to the update db query.
2023-10-24 18:58:41 +02:00
Balazs Toldi
554dfff4ad Always add the access token to the retrofit holder
This hopefully eliminates any login related issues on Lemmy 0.19
2023-10-24 18:51:32 +02:00
Balazs Toldi
741ec08386 Minor fix to updating subscribed communities
Previously, the app did not update any changes to a community after subscribing to it. Now the internal db is updated each time the list of subscribers is refreshed.
2023-10-22 18:40:01 +02:00
Balazs Toldi
f8a21fa3ba Add credits to the new icon 2023-10-22 18:26:46 +02:00
Balazs Toldi
fd6bc82214 Make icon toggleable
This commit adds an option to choose between the original and the new icon
2023-10-22 09:51:30 +02:00
Balazs Toldi
0ae8826732 Add the new icon 2023-10-22 09:03:44 +02:00
Balazs Toldi
5311edc404 Add new icon to README and fastlane 2023-10-20 11:38:20 +02:00
Balazs Toldi
d8dc8c39b2 Update README and fastlane description 2023-10-20 11:35:05 +02:00
Balazs Toldi
c43ced8b00 Merge Reproducible Builds
This commit makes release builds reproducible. This will help folks update the app from F-Droid when it's released there.
2023-10-20 09:31:53 +02:00
29 changed files with 407 additions and 48 deletions

View File

@@ -2,6 +2,7 @@ steps:
build:
image: alvrme/alpine-android:android-33-jdk11
commands:
- apk add --no-cache python3
- ./gradlew :app:assembleRelease
when:
path: [ app/**, build.gradle ]

View File

@@ -8,6 +8,7 @@ steps:
build:
image: alvrme/alpine-android:android-33-jdk11
commands:
- apk add --no-cache python3
- ./gradlew :app:assembleNightly
sign:
image: alvrme/alpine-android:android-33-jdk11

View File

@@ -1,5 +1,5 @@
<h1 align="center">
Eternity (formerly Infinity for Lemmy)
Eternity for Lemmy
</h1>
<div align="center">
@@ -36,24 +36,62 @@ A Lemmy client for Android written in Java. It's a fork of the [Infinity for Red
---
## Action Items for Eternity
## Features
Eternity is currently in the early stages of development. Expect many unfinished features and bugs!
- [x] Implementation of basic post browsing feature
- [x] Support for multiple account handling
- [x] Functionality for post upvotes/downvotes
- [x] Functionality to browse comments
- [x] Capability for creating a new post
- [x] Ability to create comments
- [x] Edit/Delete posts and comments
- [x] Basic inbox
- [ ] Elimination of code/string references specific to Reddit
- [x] Incorporation of private messaging feature
- [x] Feature for saving posts/comments
- [x] Resolving links
- [ ] Account editing function
- [ ] Multi community view?
### Browsing Lemmy
- Explore various feeds (Subscribed/Local/All) and communities
- Subscribe or unsubscribe from specific communities, with the option to block
- Discover communities federated with the current instance
- Favorite a community for quick access
- Manage your subscriptions and blocked communities
### Content Engagement
- Engage with content by voting, saving, sharing, and creating posts or comments
- Enjoy endless scrolling through feeds and posts
- Tailor the view settings for posts (card,compact, gallery)
- Set default preferences for post and comment sorting
- Stay updated with notifications for replies
### Account Management
- Sign in to multiple accounts or instances, and effortlessly switch between them
- Use the inbox features to view replies, mentions, and private messages
- Access your profile to view your posts, comments, and saved content
### Customization
- Choose between various theme options including Light, Dark, OLED
- Support Material You theming
- Explore user-created themes
- Customize font settings
- Optional bottom navigation bar
- Discover a plethora of other customization features
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/1.png"
alt="Screenshot 1"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/2.png"
alt="Screenshot 2"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/3.png"
alt="Screenshot 3"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/4.png"
alt="Screenshot 4"
height="200" >
<img
src="https://codeberg.org/Bazsalanszky/Eternity/raw/branch/master/fastlane/metadata/android/en-US/images/phoneScreenshots/5.png"
alt="Screenshot 5"
height="200" >
## Contributing

View File

@@ -21,8 +21,8 @@ android {
applicationId "eu.toldi.infinityforlemmy"
minSdk 21
targetSdk 33
versionCode 130
versionName "0.1.1"
versionCode 131
versionName "0.1.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
@@ -98,6 +98,30 @@ android {
doNotStrip '**/*.so'
}
namespace 'eu.toldi.infinityforlemmy'
task rearrangeClass(type: Exec) {
commandLine 'python', '../scripts/fixEventBus.py'
}
applicationVariants.all { variant ->
if (variant.name == 'release') {
task("compileSingleFile${variant.name.capitalize()}", type: JavaCompile, dependsOn: rearrangeClass) {
def filePath = project.rootDir.absolutePath + '/app/build/generated/ap_generated_sources/release/out/eu/toldi/infinityforlemmy/'
source = files(filePath)
includes = ["**/EventBusIndex.java"]
classpath = variant.getCompileClasspath() + files(project.rootDir.absolutePath + '/app/build/intermediates/javac/release/classes')
destinationDir = file("$buildDir/intermediates/javac/release/classes")
}
tasks.withType(JavaCompile).all { task ->
if (task.name == 'compileReleaseJavaWithJavac') {
task.finalizedBy "compileSingleFile${variant.name.capitalize()}"
}
}
}
}
}
dependencies {
@@ -246,3 +270,34 @@ dependencies {
//debugImplementation 'com.squareup.leakcanary:leakcanary-android:x.y'
}
// NB: Android Studio can't find the imports; this does not affect the
// actual build since Gradle can find them just fine.
import com.android.tools.profgen.ArtProfileKt
import com.android.tools.profgen.ArtProfileSerializer
import com.android.tools.profgen.DexFile
project.afterEvaluate {
tasks.each { task ->
if (task.name.startsWith("compile") && task.name.endsWith("ReleaseArtProfile")) {
task.doLast {
outputs.files.each { file ->
if (file.name.endsWith(".profm")) {
println("Sorting ${file} ...")
def version = ArtProfileSerializer.valueOf("METADATA_0_0_2")
def profile = ArtProfileKt.ArtProfile(file)
def keys = new ArrayList(profile.profileData.keySet())
def sortedData = new LinkedHashMap()
Collections.sort keys, new DexFile.Companion()
keys.each { key -> sortedData[key] = profile.profileData[key] }
new FileOutputStream(file).with {
write(version.magicBytes$profgen)
write(version.versionBytes$profgen)
version.write$profgen(it, sortedData, "")
}
}
}
}
}
}
}

View File

@@ -441,11 +441,36 @@
android:theme="@style/AppTheme.Launcher"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity-alias
android:name=".DefaultIcon"
android:targetActivity=".activities.MainActivity"
android:label="@string/application_name"
android:enabled="true"
android:icon="@mipmap/ic_launcher"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity-alias
android:name=".OriginalIcon"
android:targetActivity=".activities.MainActivity"
android:label="@string/application_name"
android:enabled="false"
android:icon="@mipmap/original_ic_launcher"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
<activity
android:name=".activities.LoginActivity"
android:configChanges="orientation|screenLayout|screenSize|layoutDirection"

View File

@@ -336,9 +336,8 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb
fragmentManager = getSupportFragmentManager();
mAccessToken = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCESS_TOKEN, null);
if (mCurrentAccountSharedPreferences.getBoolean(SharedPreferencesUtils.BEARER_TOKEN_AUTH, true)) {
mRetrofit.setAccessToken(mAccessToken);
}
mRetrofit.setAccessToken(mAccessToken);
mAccountName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_NAME, null);
mAccountQualifiedName = mCurrentAccountSharedPreferences.getString(SharedPreferencesUtils.ACCOUNT_QUALIFIED_NAME, null);

View File

@@ -49,6 +49,7 @@ public class InsertSubscribedThings {
for (SubscribedSubredditData s : subscribedSubredditDataList) {
if (existingSubscribedSubredditDataList.contains(s)) {
subscribedSubredditDao.updateSubscribedSubreddit(s.getQualified_name(), s.getName(), s.getIconUrl(), accountName);
continue;
}
subscribedSubredditDao.insert(s);

View File

@@ -1,6 +1,8 @@
package eu.toldi.infinityforlemmy.settings;
import android.content.ComponentName;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.widget.Toast;
@@ -42,6 +44,7 @@ public class MiscellaneousPreferenceFragment extends CustomFontPreferenceFragmen
ListPreference languageListPreference = findPreference(SharedPreferencesUtils.LANGUAGE);
EditTextPreference anonymousAccountInstance = findPreference(SharedPreferencesUtils.ANONYMOUS_ACCOUNT_INSTANCE);
EditTextPreference postFeedMaxResolution = findPreference(SharedPreferencesUtils.POST_FEED_MAX_RESOLUTION);
ListPreference iconPreference = findPreference(SharedPreferencesUtils.ICON_PREFERENCE);
if (mainPageBackButtonActionListPreference != null) {
mainPageBackButtonActionListPreference.setOnPreferenceChangeListener((preference, newValue) -> {
@@ -102,5 +105,41 @@ public class MiscellaneousPreferenceFragment extends CustomFontPreferenceFragmen
return true;
});
}
if (iconPreference != null) {
iconPreference.setOnPreferenceChangeListener((preference, newValue) -> {
updateIcon((String) newValue);
return true;
});
}
}
private void updateIcon(String iconValue) {
PackageManager pm = getActivity().getPackageManager();
// Disable all the alternative icons
pm.setComponentEnabledSetting(
new ComponentName(getActivity(), "eu.toldi.infinityforlemmy.OriginalIcon"),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
pm.setComponentEnabledSetting(
new ComponentName(getActivity(), "eu.toldi.infinityforlemmy.DefaultIcon"),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
// Enable the chosen icon
if ("original_icon".equals(iconValue)) {
pm.setComponentEnabledSetting(
new ComponentName(getActivity(), "eu.toldi.infinityforlemmy.OriginalIcon"),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP);
} else {
pm.setComponentEnabledSetting(
new ComponentName(getActivity(), "eu.toldi.infinityforlemmy.DefaultIcon"),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED,
PackageManager.DONT_KILL_APP);
}
}
}

View File

@@ -36,4 +36,7 @@ public interface SubscribedSubredditDao {
@Query("SELECT * from subscribed_subreddits WHERE username = :qualified_name AND name LIKE '%' || :searchQuery || '%' COLLATE NOCASE AND is_favorite = 1 ORDER BY name COLLATE NOCASE ASC")
LiveData<List<SubscribedSubredditData>> getAllFavoriteSubscribedSubredditsWithSearchQuery(String qualified_name, String searchQuery);
@Query("UPDATE subscribed_subreddits SET name = :displayName, icon = :icon WHERE qualified_name = :qualified_name AND username = :accountName COLLATE NOCASE")
void updateSubscribedSubreddit(String qualified_name, String displayName, String icon, String accountName);
}

View File

@@ -420,4 +420,6 @@ public class SharedPreferencesUtils {
public static final String SHOW_POST_AND_COMMENT_SCORE = "show_score";
public static final String SHARE_LINK_ON_LOCAL_INSTANCE = "share_link_on_local_instance";
public static final String ICON_PREFERENCE = "icon_preference";
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="512"
android:viewportHeight="512">
<path
android:pathData="M0,0h512v512h-512z"
android:fillColor="#F3DBB9" />
<group>
<clip-path android:pathData="M0,0h512v512h-512z" />
<path
android:pathData="M233.34,72.72m-169.34,0a169.34,169.34 0,1 1,338.68 0a169.34,169.34 0,1 1,-338.68 0"
android:fillColor="#F94E3C" />
<path
android:pathData="M124.6,0l-124.6,0l0,145.83l275.01,366.17l236.99,0l-0,-214l-387.4,-298Z"
android:fillColor="#FFB026" />
<path
android:pathData="M448,474.98m-121.24,0a121.24,121.24 0,1 1,242.48 0a121.24,121.24 0,1 1,-242.48 0"
android:fillColor="#82F5D4" />
<path
android:pathData="M0,512c-21.42,-243.29 239.91,-279.77 239.91,-279.77c0,-0 -68.17,142.79 80.18,279.77c40.15,37.07 -315.52,51.92 -320.1,0Z"
android:fillColor="#F1EA4F" />
<group>
<clip-path android:pathData="M18.97,-135.06c-85.05,-0 -156.55,81.43 -156.55,184.25c0,102.82 71.5,184.25 156.55,184.25c85.05,-0 156.55,-81.43 156.55,-184.25c0,-102.82 -71.5,-184.25 -156.55,-184.25ZM18.97,-111.06c73.16,-0 132.55,71.81 132.55,160.25c0,88.44 -59.4,160.25 -132.55,160.25c-73.16,-0 -132.55,-71.81 -132.55,-160.25c0,-88.45 59.4,-160.25 132.55,-160.25Z" />
</group>
<group>
<clip-path android:pathData="M520.97,-177.56c-85.05,0 -156.55,81.43 -156.55,184.25c0,102.82 71.5,184.25 156.55,184.25c85.05,0 156.55,-81.43 156.55,-184.25c0,-102.82 -71.5,-184.25 -156.55,-184.25ZM520.97,-153.56c73.16,0 132.55,71.81 132.55,160.25c0,88.45 -59.4,160.25 -132.55,160.25c-73.16,0 -132.55,-71.81 -132.55,-160.25c0,-88.44 59.4,-160.25 132.55,-160.25Z" />
</group>
</group>
</vector>

View File

@@ -0,0 +1,72 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="512dp"
android:height="512dp"
android:viewportWidth="740"
android:viewportHeight="740">
<group
android:translateX="120"
android:translateY="120">
<clip-path android:pathData="M0,0h512v512h-512z" />
<path
android:pathData="M179.76,220.04a91.29,93.65 0,1 0,182.58 0a91.29,93.65 0,1 0,-182.58 0z"
android:fillColor="#000F44" />
<path
android:pathData="M161.99,207.29c-0.42,14.79 121.94,114.37 139.21,105.89c5.22,-2.56 -11.67,-11.26 -5.25,-12.06c15.88,-1.97 12.87,-24.19 18.18,-30.99c20.97,-26.82 27.47,-71.3 -15.65,-97.84c-32.7,-20.13 -69.99,-7 -85.19,13.06c-7.59,10.02 -19.13,7.43 -22.99,12.82c-5.83,8.14 -4.47,3.14 -5.36,-2.2c-2.46,-14.77 -22.43,-7.04 -22.95,11.31Z"
android:fillColor="#426367" />
<path
android:pathData="M256,174.58m-19.34,0a19.34,19.34 0,1 1,38.68 0a19.34,19.34 0,1 1,-38.68 0"
android:fillColor="#426367" />
<path
android:pathData="M314.97,212.69m-19.34,0a19.34,19.34 0,1 1,38.68 0a19.34,19.34 0,1 1,-38.68 0"
android:fillColor="#426367" />
<path
android:pathData="M205.75,274.58c13.55,17.51 71.46,47.84 93.99,25.51c11.36,-11.26 -1.88,-11.27 -0,-18.44c10.98,-41.87 -9.94,-35.84 -36.98,-56.33c-27.25,-20.65 -33.02,-38.56 -57.01,-17.37c-7.75,6.84 -14.71,-0.6 -18.91,4.54c-12.25,14.96 3.34,41.97 18.91,62.08Z"
android:fillColor="#918279" />
<path
android:pathData="M264.29,224.92m-6.06,0a6.06,6.06 0,1 1,12.13 0a6.06,6.06 0,1 1,-12.13 0"
android:fillColor="#000F44" />
<path
android:pathData="M260.1,187.88c5.34,3.55 6.78,10.77 3.23,16.1c-3.55,5.34 -8.39,4.41 -13.72,0.85c-5.34,-3.55 -9.16,-8.39 -5.61,-13.73c3.55,-5.34 10.77,-6.78 16.1,-3.23Z"
android:fillColor="#000F44" />
<path
android:pathData="M302.1,213.76c5.34,3.55 6.78,10.77 3.23,16.1c-3.55,5.34 -8.39,4.41 -13.73,0.86c-5.34,-3.55 -9.16,-8.39 -5.61,-13.73c3.55,-5.34 10.77,-6.78 16.1,-3.23Z"
android:fillColor="#000F44" />
<path
android:pathData="M251.24,185.73c2.14,-0.45 4.24,0.87 4.68,2.95c0.44,2.08 -0.95,4.13 -3.09,4.59c-2.14,0.45 -4.24,-0.87 -4.68,-2.95c-0.44,-2.08 0.95,-4.13 3.09,-4.59Z"
android:fillColor="#82F5D4" />
<path
android:pathData="M294.81,211.51c2.22,-0.47 4.39,0.9 4.85,3.06c0.45,2.15 -0.98,4.28 -3.2,4.75c-2.22,0.47 -4.39,-0.9 -4.85,-3.06c-0.46,-2.15 0.98,-4.28 3.2,-4.75Z"
android:fillColor="#82F5D4" />
<path
android:pathData="M229.32,420.89c-0.38,-9.41 -0.4,-12.12 -3.04,-21.61c-18.38,-66.06 15.68,-73.88 33.95,-69.82c12.06,2.67 30.13,2.04 33.66,-15.43c1.16,-5.77 -10.31,-7.13 -14.76,-7.68c-14.47,-1.78 -45.16,-4.09 -55.9,-13.06c-17.83,-14.89 -23.98,-46.08 -32.37,-73.04c-6.4,-20.58 -12.88,-35.01 -19.32,-42.08c-12.81,-14.06 -28.61,-6.82 -24.75,14.53c1.19,6.6 9.81,25.35 13.99,35.64c5.04,12.41 1.54,23.97 -0.39,35.46c-3.34,19.91 -3.27,52.95 -3.27,52.95c-0,0 -16.23,7.15 -18.11,22.41c-2.57,20.83 13.45,29.74 13.45,29.74c0,0 -1.15,12.65 -3.39,20.82c-2,7.26 6.16,9.73 9.54,5.03c7.25,-10.08 15.02,-25.48 15.02,-25.48c0,0 7.59,6.8 10.98,11.47c4.36,6.01 14.72,11.72 20.76,15.66c8.65,5.64 11.18,14.34 15.36,26.16c1.49,4.22 8.78,2.83 8.6,-1.64Z"
android:fillColor="#000F44" />
<path
android:pathData="M218.27,304.12c1.45,-1.18 2.27,-2.97 2.22,-4.84c-0.05,-1.87 -0.96,-3.61 -2.47,-4.72c-5.72,-4.19 -14.14,-10.35 -20.1,-14.71c-1.61,-1.18 -3.7,-1.49 -5.58,-0.82c-1.88,0.66 -3.32,2.21 -3.83,4.14c-1.85,6.92 -4.39,16.38 -5.85,21.84c-0.69,2.59 0.4,5.32 2.68,6.72c2.93,1.8 6.94,4.27 9.83,6.04c2.19,1.35 5,1.16 6.99,-0.47c4.08,-3.33 11.07,-9.05 16.12,-13.16Z"
android:fillColor="#426367" />
<path
android:pathData="M158.59,183.75m-8.2,0a8.2,8.2 0,1 1,16.41 0a8.2,8.2 0,1 1,-16.41 0"
android:fillColor="#426367" />
<path
android:pathData="M226.47,318.64c0,-0 7.6,52.73 48.87,80.16c41.26,27.43 70.49,-12.13 118.23,-6.93c105.73,11.52 125.82,133.74 125.82,133.74"
android:strokeWidth="8"
android:fillColor="#00000000"
android:strokeColor="#000F44" />
<path
android:pathData="M182.47,209.44a95.4,98.97 0,1 0,190.81 0a95.4,98.97 0,1 0,-190.81 0z"
android:strokeWidth="12"
android:fillColor="#00000000"
android:strokeColor="#000F44" />
<path
android:pathData="M337.26,159.6c3.89,-0.82 7.81,2.17 8.76,6.68c0.95,4.51 -1.43,8.83 -5.32,9.65c-3.89,0.82 -7.81,-2.17 -8.77,-6.68c-0.95,-4.51 1.43,-8.83 5.32,-9.65Z"
android:fillColor="#ffffff" />
<path
android:pathData="M323.37,175.31c1.51,-0.32 3.03,0.84 3.39,2.59c0.37,1.75 -0.56,3.42 -2.06,3.74c-1.5,0.32 -3.03,-0.84 -3.39,-2.59c-0.37,-1.75 0.56,-3.42 2.06,-3.74Z"
android:fillColor="#ffffff" />
<path
android:pathData="M202.41,225.13c1.93,-0.62 3.14,9.33 6.65,20.17c3.51,10.83 8,18.47 6.07,19.09c-1.93,0.62 -8.98,-5.51 -12.49,-16.34c-3.51,-10.83 -2.16,-22.29 -0.23,-22.91Z"
android:fillColor="#ffffff" />
<path
android:pathData="M278.08,313.74c4.52,0.32 8.05,2.53 7.88,4.95c-0.17,2.41 -3.97,4.12 -8.49,3.8c-4.52,-0.32 -8.05,-2.53 -7.88,-4.95c0.17,-2.41 3.97,-4.12 8.49,-3.8Z"
android:fillColor="#426367" />
</group>
</vector>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground_monochrome" />
<background android:drawable="@drawable/icon_new_colour_background" />
<foreground android:drawable="@drawable/icon_new_colour_foreground" />
<monochrome android:drawable="@drawable/icon_new" />
</adaptive-icon>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground_monochrome" />
<background android:drawable="@drawable/icon_new_colour_background" />
<foreground android:drawable="@drawable/icon_new_colour_foreground" />
<monochrome android:drawable="@drawable/icon_new" />
</adaptive-icon>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground_monochrome" />
</adaptive-icon>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground_monochrome" />
</adaptive-icon>

View File

@@ -691,4 +691,13 @@
<item>1</item>
</string-array>
<string-array name="icon_labels">
<item>Cosmic Lemmy</item>
<item>Galactic Cruiser Lemmy</item>
</string-array>
<string-array name="icon_values">
<item>default_icon</item>
<item>original_icon</item>
</string-array>
</resources>

View File

@@ -1386,4 +1386,8 @@
<string name="settings_hide_user_instance">Hide user instance</string>
<string name="share_links_on_your_local_instance_rather_than_the_original_creation_instance">Share links on your local instance rather than the original creation instance.</string>
<string name="share_links_on_your_local_instance">Share links on your local instance</string>
<string name="icon_original_label">Original Icon</string>
<string name="settings_credits_new_icon">New app icon (Cosmic Lemmy)</string>
<string name="settings_credits_new_icon_summary">Made by David Gerla</string>
</resources>

View File

@@ -2,6 +2,11 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="new_icon_foreground"
app:title="@string/settings_credits_new_icon"
android:summary="@string/settings_credits_new_icon_summary" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference
android:key="icon_foreground"
app:title="@string/settings_credits_icon_foreground_title"

View File

@@ -52,6 +52,13 @@
app:title="@string/share_links_on_your_local_instance"
app:summary="@string/share_links_on_your_local_instance_rather_than_the_original_creation_instance" />
<ListPreference
app:key="icon_preference"
app:title="Change App Icon"
app:entries="@array/icon_labels"
app:entryValues="@array/icon_values"
app:defaultValue="default_icon" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreferenceCategory app:title="@string/settings_miscellaneous_dangerous_group_title" />
<eu.toldi.infinityforlemmy.customviews.CustomFontPreference

View File

@@ -24,8 +24,4 @@ allprojects {
maven { url "https://jitpack.io" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
}

View File

@@ -1,17 +1,45 @@
<h1>Eternity</h1>
<p>A client for Lemmy, specifically designed for Android and written in Java. This project is a fork of the Infinity for Reddit project, and it is currently in the early stages of development. As such, expect many unfinished features and potential bugs!</p>
<h1>Eternity</h1>
<p>A client for Lemmy, specifically designed for Android and written in Java. This project is a fork of the Infinity for
Reddit project, and it is currently in the early stages of development. As such, expect many unfinished features and
potential bugs!</p>
<h2>Development Progress</h2>
<h2>Features</h2>
<p>Eternity is currently in the early stages of development. Expect many
unfinished features and bugs!</p>
<h3>Browsing Lemmy</h3>
<ul>
<li>[x] Implementation of basic post browsing feature</li>
<li>[x] Support for multiple account handling</li>
<li>[x] Functionality for post upvotes/downvotes</li>
<li>[x] Functionality to browse comments</li>
<li>[ ] Capability for creating a new post</li>
<li>[x] Ability to create comments</li>
<li>[ ] Elimination of code/string references specific to Reddit</li>
<li>[ ] Incorporation of private messaging feature</li>
<li>[ ] Feature for saving posts</li>
<li>[ ] Account editing function</li>
<li>[ ] Multi community view?</li>
<li>Explore various feeds (Subscribed/Local/All) and communities</li>
<li>Subscribe or unsubscribe from specific communities, with the option
to block</li>
<li>Discover communities federated with the current instance</li>
<li>Favorite a community for quick access</li>
<li>Manage your subscriptions and blocked communities</li>
</ul>
<h3>Content Engagement</h3>
<ul>
<li>Engage with content by voting, saving, sharing, and creating posts
or comments</li>
<li>Enjoy endless scrolling through feeds and posts</li>
<li>Tailor the view settings for posts (card,compact, gallery)</li>
<li>Set default preferences for post and comment sorting</li>
<li>Stay updated with notifications for replies</li>
</ul>
<h3>Account Management</h3>
<ul>
<li>Sign in to multiple accounts or instances, and effortlessly switch
between them</li>
<li>Use the inbox features to view replies, mentions, and private
messages</li>
<li>Access your profile to view your posts, comments, and saved
content</li>
</ul>
<h3>Customization</h3>
<ul>
<li>Choose between various theme options including Light, Dark,
OLED</li>
<li>Support Material You theming</li>
<li>Explore user-created themes</li>
<li>Customize font settings</li>
<li>Optional bottom navigation bar</li>
<li>Discover a plethora of other customization features</li>
</ul>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 47 KiB

32
scripts/fixEventBus.py Normal file
View File

@@ -0,0 +1,32 @@
import re
import sys
def rearrange(filename):
with open(filename, 'r') as file:
content = file.read()
# Regex to find the blocks of code to rearrange
pattern = re.compile(r'(putIndex\(new SimpleSubscriberInfo\(.*?\)\);)', re.DOTALL)
blocks = pattern.findall(content)
# Sort blocks based on the class names mentioned in SimpleSubscriberInfo instances
sorted_blocks = sorted(blocks, key=lambda x: re.search(r'SimpleSubscriberInfo\((.*?),', x).group(1))
# Replace the original blocks with the sorted blocks
sorted_content = pattern.sub(lambda match: sorted_blocks.pop(0), content)
with open(filename, 'w') as file:
file.write(sorted_content)
# Project root relative to the script
project_root = __file__[:-len('/scripts/fixEventBus.py')]
path = './build/generated/ap_generated_sources/release/out/eu/toldi/infinityforlemmy/EventBusIndex.java'
# Print the path to the file to stderr
print(path, file=sys.stderr)
# Call the function with the path to EventBusIndex.java
rearrange(path)