Coder Social home page Coder Social logo

tunous / dawn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saket/dank

450.0 450.0 36.0 19.11 MB

Here lies the fork of greatest open-source Reddit app

License: Apache License 2.0

Java 89.25% Kotlin 10.73% Shell 0.03%
android-application reddit-client

dawn's Introduction

Hi there ๐Ÿ‘‹

My open source Swift packages

Package Description Status
DebouncedOnChange SwiftUI onChange View extension with debounce time CI
EnvironmentBinding A property wrapper that reads a binding from a SwiftUI's viewโ€™s environment CI
LongPressButton A SwiftUI button that initiates action on tap or long press CI
FormulaApi Interact with Ergast Formula 1 API in Swift
PathControl SwiftUI wrapper for NSPathControl
XCAppTest Utilities for easier interaction with XCUITest methods
SwiftUITheme Theming system for SwiftUI

dawn's People

Contributors

absurdlysuspicious avatar dependabot-preview[bot] avatar dependabot[bot] avatar easyvector avatar federa7675 avatar github-actions[bot] avatar izzysoft avatar jakubfabijan avatar m86xkc avatar msfjarvis avatar saket avatar shore-leave avatar subhrajyotisen avatar teliov avatar thepreviousone avatar tunous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dawn's Issues

After AndroidX merge project is not syncing

Any ideas how to solve this? This is after AndroidX merge. I already installed all android studio recommended updates, clean and rebuilt, etc...

10:05	Gradle sync failed: 'Gradle: com.google.truth:truth:0.40@jar' already disposed: --------------Creation trace: 
			java.lang.Throwable: 1566047138269
			at com.intellij.openapi.util.TraceableDisposable.<init>(TraceableDisposable.java:44)
			at com.intellij.openapi.roots.impl.libraries.LibraryImpl.<init>(LibraryImpl.java:102)
			at com.intellij.openapi.roots.impl.libraries.LibraryImpl.<init>(LibraryImpl.java:74)
			at com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.createLibrary(LibraryTableBase.java:298)
			at com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.createLibrary(LibraryTableBase.java:291)
			at com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.createLibrary(LibraryTableBase.java:285)
			at com.intellij.openapi.externalSystem.service.project.AbstractIdeModifiableModelsProvider.createLibrary(AbstractIdeModifiableModelsProvider.java:257)
			at com.android.tools.idea.gradle.project.sync.setup.module.android.AndroidModuleDe... (show balloon)

Splash screen on startup

the splashscreen showing dank's logo at startup looks ugly imo. it will look better & load the app faster if it is removed.

'Post to Reddit' - Design

Hey,
I'm sharing my first try at post submission for Dank. I have no idea how to code - I can design only.

Here's link: https://invis.io/H6PVTGBKXWT There are 6 screens in different states.

It's a first shot at this, I tried to stick as close to original designs as I only could. I do have one or two different ideas for it, so I might upload them later.

com.google.android.exoplayer2.ExoPlaybackException in MediaAlbumViewerActivity

Error in Dank

com.google.android.exoplayer2.ExoPlaybackException in MediaAlbumViewerActivity

View on Bugsnag

Stacktrace

https://github.com/Tunous/Dank/blob/219a5b71b62eb8ab92be30aef8368980bb585ae9/app/src/main/java/me/saket/dank/ui/media/MediaVideoFragment.java#L239

com.google.android.exoplayer2.ExoPlaybackException
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.throwDecoderInitError(MediaCodecRenderer.java:418)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:405)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:839)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:455)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:536)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:560)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:306)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:193)
	at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: OMX.qcom.video.decoder.vp8, Format(1, null, video/x-vnd.on2.vp8, -1, null, [640, 360, -1.0], [-1, -1])
	... 9 more
Caused by: java.lang.IllegalArgumentException
	at android.media.MediaCodec.native_configure(Native Method)
	at android.media.MediaCodec.configure(MediaCodec.java:1960)
	at android.media.MediaCodec.configure(MediaCodec.java:1889)
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.configureCodec(MediaCodecVideoRenderer.java:414)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.maybeInitCodec(MediaCodecRenderer.java:394)
	... 8 more

View full stacktrace

Created automatically via Bugsnag

Different views for the post list - images with fixed height

I know it might be too early for this, but one of the things I don't like in Dank is that browsing image heavy subreddits is a bit less comfortable than in other clients. So I'd like to suggest adding new view type with bigger images, that have fixed height. Since I can't code, I made some designs as inspiration/suggestion how it could possibly look like:

Image in the middle with rounded corners

fix height image view 0

Image in the middle, full width

fix height image view 2

Image at the top, full width

fix height image view 1

Images not saving?

Anyone else does have the 'image saved' notification but no image is saved whatsoever? I have no crash or errors.

I've tested on master branch

[WIP] Multi Account Support

Using the same approach with App Shortcuts I'm working on the multi account support since the reddit library already supports it.

It allows to add/remove accounts. Switch to another or logout (while keeping the authentication data). The list can also be ordered by drag 'n' drop (same as app shortcuts).

accounts

  • Able to Login (add account)

  • Store users

  • Switch between users

  • Delete an account (Although no confirmation)

  • Add delete confirmation ?

  • Logout and become userless

  • Improve swipe actions

  • Investigate crashes

  • Testing

  • Code Clean Up

Repeated image on notification when you save a video

Originally reported here #20

Some notifications (for downloading a video) will show a repeated/random image of a previous downloaded video. After cleaning the cache the issue is gone but after downloading some more videos the issue appears again.

video notification

This does not happend with images as far as I've tested.

Add option to change the location of the Best/Top/Controversial button to right side

When using the app one-handed, it is inconvenient to reach all the way over to change the subreddit view of an app from Best to Top to whatever because I am right-handed, and the button is on the left side.

Having an option in the look and feel settings to toggle this button on the left or right just like the thumbnails of content would solve this problem.

ExampleException in home#example

Test error in Example.com

ExampleException in home#example
Something really bad happened

View on Bugsnag

Stacktrace

app/controllers/home_controller.rb:123 - example
app/controllers/other_controller.rb:12 - broken
lib/important/magic.rb:4 - load_something

View full stacktrace

Created by ลukasz Rutkowski via Bugsnag

Downloading images sometimes crashes the app

Error in Dank

java.lang.RuntimeException in MediaAlbumViewerActivity
Can't create handler inside thread Thread[RxCachedThreadScheduler-28,5,main] that has not called Looper.prepare()

View on Bugsnag

Stacktrace

java.lang.RuntimeException: Can't create handler inside thread Thread[RxCachedThreadScheduler-28,5,main] that has not called Looper.prepare()
	at android.os.Handler.<init>(Handler.java:205)
	at android.os.Handler.<init>(Handler.java:118)
	at me.saket.dank.notifs.MediaDownloadService.lambda$null$12$MediaDownloadService(MediaDownloadService.java:502)
	at me.saket.dank.notifs.-$$Lambda$MediaDownloadService$H-1UbqGtQJepc-ZJFswNvk5NvYI.cancel(Unknown Source:4)
	at io.reactivex.internal.disposables.CancellableDisposable.dispose(CancellableDisposable.java:49)
	at io.reactivex.internal.disposables.DisposableHelper.dispose(DisposableHelper.java:125)
	at io.reactivex.internal.operators.observable.ObservableCreate$CreateEmitter.dispose(ObservableCreate.java:122)
	at io.reactivex.internal.operators.observable.ObservableUnsubscribeOn$UnsubscribeObserver$DisposeTask.run(ObservableUnsubscribeOn.java:95)
	at io.reactivex.Scheduler$DisposeTask.run(Scheduler.java:452)
	at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66)
	at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:764)

View full stacktrace

Created automatically via Bugsnag

F-Droid support

Since this is open source, why not release it on F-Droid. Would be nice

Light theme?

Personally, I'd like to see a light theme to complement the existing dark theme. Support for the system's Dark theme toggle would also be nice.

This is probably a very long way out at best.

Gestures' action icon position

When you scroll down a comment that is larger than the screen viewport swipe gesture don't show the icon since it is in a fixed position (center/vertical), so you get the actions color but no the actions icon.

I'm working on this 'solution', to keep the icon on the top of the comment area instead of the middle:

gestures

Thoughts?

MediaViewer: fix position of option buttons

Tried out this patch, but it doesn't seem to work. I tested on a Nougat (API 25) emulator.

Before:

screenshot_1547304905

After:

screenshot_1547304852

  • The option buttons moved behind the navigation bar
  • The status bar is now partially visible. I was using WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS so that the translucent bar also gets removed.

What phone did you test this on?

ExampleException in home#example

Test error in Example.com

ExampleException in home#example
Something really bad happened

View on Bugsnag

Stacktrace

app/controllers/home_controller.rb:123 - example
app/controllers/other_controller.rb:12 - broken
lib/important/magic.rb:4 - load_something

View full stacktrace

Created by ลukasz Rutkowski via Bugsnag

Adaptive Icon

Please, add a better and adaptive icon.

The current one is not bad, but its resolution/quality is very poor (this is especially noticeable in splash screen).

And besides, it's not adaptive like all my other apps.

Window glitch on flicking image

This is a relatively small bug, but I was wondering why the status bar appears to fall down the screen after an image is flicked away. I seems to be part of the overlay that dims the background but I'm not sure. This only happens with images and gifs, but not videos using the reddit player.
imagebug

Re-downloading the same image causes app crash

Describe the bug
Pressing download on a previously downloaded picture will crash the app

To Reproduce
Steps to reproduce the behavior:

  1. Go to any subreddit
  2. Open up a post with a picture
  3. Press the download button to download the picture
  4. Press the download button again to see the app crash

Expected behavior
The app should not crash

Screenshots

Smartphone (please complete the following information):

  • Device: Xiaomi Redmi Note 5 Pro
  • OS: AOSP Android 9.0
  • Version: 7.3.0 @ 7a08d35

Additional context
Logcat snippet: https://del.dog/eyezotuyek.nginx

Navigating to user profile via link does nothing

Error in Dank

java.lang.RuntimeException in UrlRouter.java:64
Unable to start activity ComponentInfo{me.thanel.dank/me.saket.dank.deeplinks.DeepLinkHandlingActivity}: java.lang.UnsupportedOperationException: Use forLink(RedditUserLink) instead.

View on Bugsnag

Stacktrace

java.lang.RuntimeException: Unable to start activity ComponentInfo{me.thanel.dank/me.saket.dank.deeplinks.DeepLinkHandlingActivity}: java.lang.UnsupportedOperationException: Use forLink(RedditUserLink) instead.
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2951)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6719)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.UnsupportedOperationException: Use forLink(RedditUserLink) instead.
        at me.saket.dank.ui.UrlRouter.forLink(UrlRouter.java:64)
        at me.saket.dank.deeplinks.DeepLinkHandlingActivity.onCreate(DeepLinkHandlingActivity.java:61)
        at android.app.Activity.performCreate(Activity.java:7144)
        at android.app.Activity.performCreate(Activity.java:7135)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2931)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3086)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6719)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

View full stacktrace

Created automatically via Bugsnag

Downloading images causes ANR

Describe the bug
Trying to download a image from a Reddit post causes an ANR.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any post with a picture
  2. Click on the picture
  3. Press the download button
  4. A notification is shown saying 'Queued 'https://i.redd.it/...' but the download never completes.

Expected behavior
The image downloads fully and a media notification is posted for it.

Screenshots

Smartphone (please complete the following information):

  • Device: Redmi Note 5 Pro
  • OS: AOSP 9.0
  • Version 0.7.3 (6115aeb)

Additional context
I managed to extract the ANR trace, from my device: https://del.dog/xokoziyeje.pl

Video player's play button animation doesn't work in reverse

Describe the bug
Play/pause icon in the video player doesn't animate back from the pause icon to play icon.

To Reproduce
Steps to reproduce the behavior:

  1. Go to any video
  2. Click on pause button

Expected behavior
Pause icon animates back to play icon.

Additional context
The issue is caused by the use of reverse method through reflection in ReversibleAnimatedVectorDrawable which is not available since API 24.

java.util.concurrent.ExecutionException in SubredditActivity

Error in Dank

java.util.concurrent.ExecutionException in SubredditActivity
com.bumptech.glide.load.engine.GlideException: Failed to load resource
There was 1 cause:
javax.net.ssl.SSLHandshakeException(SSL handshake aborted: ssl=0x77dea81b88: I/O error during system call, Connection reset by peer)
call GlideException#logRootCauses(String) for more detail

View on Bugsnag

Stacktrace

RequestFutureTarget.java:212 - com.bumptech.glide.request.RequestFutureTarget.doGet

View full stacktrace

Created automatically via Bugsnag

Keyboard lag on reply

Anyone else is having a keyboard lag? I've read about it on the subreddit and my phone also lags while writing a reply.

Since then I could pinpoint where the lag is introduced and it's on the markdown hint process. It seems that slow (or some) phones does not have enough cpu to process the markdown between keystrokes.

I'm working on in with no results so far.

Edit

The lag begins with this line

Node markdownRootNode = parser.parse(SubSequence.of(editable));

(MarkdownHints.java:78)

The issue is that the parser takes too long on every keystroke that the UI starts skipping frames. On the logcat you will see:

Choreographer: Skipped X frames!
The application may be doing too much work on its main thread.

If the user types too fast Dank will eventually crash or freeze.

I did try disabling the markdown and the reply experience is smooth as it should be.

I did try a few things such as running the markdown process on background thread but I've had nothing but crashes.

Point login page to new app

Login page shows Dank name. App key should be change too?. It's really confusing using Dawn reddit and giving Dank the permission.

Originally posted by @Esselans in #74 (comment)

com.google.android.exoplayer2.ExoPlaybackException in MediaAlbumViewerActivity

Error in Dank

com.google.android.exoplayer2.ExoPlaybackException in MediaAlbumViewerActivity

View on Bugsnag

Stacktrace

https://github.com/Tunous/Dank/blob/219a5b71b62eb8ab92be30aef8368980bb585ae9/app/src/main/java/me/saket/dank/ui/media/MediaVideoFragment.java#L239

com.google.android.exoplayer2.ExoPlaybackException
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:355)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:214)
	at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.
	at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:820)
	at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:742)
	at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:315)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:919)

View full stacktrace

Created automatically via Bugsnag

Dank UI - Discussion

First of all, I'd like to say that I do really like Dank in general, in terms of UI and the feeling. However, there are few things I think might or even should be changed for more consistency and better UX. So I created this thread for discussion.

Something I think I know how should be fixed:
image
Number of upvotes - while it is something that makes Dank stand out from the crowd, I do think that number should be shown after the title, not before it, at least as an option. Here's an example:
image

It will be easier to read the titles that don't have similar score number (my eyes won't have to jump left/right anymore, to read the title). Here's an example that shows what makes me feel uncomfortable reading the titles:
image

Another thing on the same screen is that horizontal bar with sorting button. I do like how this button looks like, but I don't like that it is alone, making almost whole line of wasted space and it makes no sense that it's fixed to that view:
image
image

What's the point of Toolbar having a shadow when it's not really covering anything since that grey bar with button that changes sorting is not moving at all. I honestly don't have a good idea what could be done for it to make more sense for now.

The last thing I find a bit annoying is way more minor than the rest. In comments view when there's picture on top of the screen, there is also close button in the left corner and of course there should be icon to close but sometimes it's obscuring something which does not really look good, here's an example:
screenshot_20190111-001650

I hope I did not sound harsh nor rude, I do have issues with explaining things in a gentle manner in foreign language. Sorry if I did.

Entering login screen might result in a crash

Under some conditions entering login screen might result in an application crash caused by network call made to authenticate in userless mode. Requirement is to be not logged in, have no valid authentication data stored, and then enter login screen. Sadly I didn't manage to reproduce this issue as going through earlier screen automatically prevents this case from being reproducible (JrawReddit is being initialized as singleton earlier in background thread).

I've attached a potential fix but I don't want to commit it unless we manage to reproduce the issue and verify that the fix doesn't cause different hidden problems.

https://github.com/Tunous/Dank/blob/0d4226a9122123187de91610b4e51f5a5fadb43b/app/src/main/java/me/saket/dank/reddit/jraw/JrawReddit.kt#L38

Stacktrace
java.lang.RuntimeException: 
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2473)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2535)
  at android.app.ActivityThread.access$1100 (ActivityThread.java:154)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1396)
  at android.os.Handler.dispatchMessage (Handler.java:102)
  at android.os.Looper.loop (Looper.java:148)
  at android.app.ActivityThread.main (ActivityThread.java:5582)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)

Caused by: android.os.NetworkOnMainThreadException: 
  at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork (StrictMode.java:1273)
  at java.net.InetAddress.lookupHostByName (InetAddress.java:431)
  at java.net.InetAddress.getAllByNameImpl (InetAddress.java:252)
  at java.net.InetAddress.getAllByName (InetAddress.java:215)
  at okhttp3.Dns$1.lookup (Dns.java:40)
  at okhttp3.internal.connection.RouteSelector.resetNextInetSocketAddress (RouteSelector.java:185)
  at okhttp3.internal.connection.RouteSelector.nextProxy (RouteSelector.java:149)
  at okhttp3.internal.connection.RouteSelector.next (RouteSelector.java:84)
  at okhttp3.internal.connection.StreamAllocation.findConnection (StreamAllocation.java:214)
  at okhttp3.internal.connection.StreamAllocation.findHealthyConnection (StreamAllocation.java:135)
  at okhttp3.internal.connection.StreamAllocation.newStream (StreamAllocation.java:114)
  at okhttp3.internal.connection.ConnectInterceptor.intercept (ConnectInterceptor.java:42)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:121)
  at okhttp3.internal.cache.CacheInterceptor.intercept (CacheInterceptor.java:93)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:121)
  at okhttp3.internal.http.BridgeInterceptor.intercept (BridgeInterceptor.java:93)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
  at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept (RetryAndFollowUpInterceptor.java:126)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:147)
  at okhttp3.internal.http.RealInterceptorChain.proceed (RealInterceptorChain.java:121)
  at okhttp3.RealCall.getResponseWithInterceptorChain (RealCall.java:200)
  at okhttp3.RealCall.execute (RealCall.java:77)
  at net.dean.jraw.http.OkHttpNetworkAdapter.execute (OkHttpNetworkAdapter.kt:16)
  at net.dean.jraw.oauth.OAuthHelper.applicationOnlyOAuthData$lib (OAuthHelper.kt:88)
  at net.dean.jraw.oauth.OAuthHelper.automatic (OAuthHelper.kt:30)
  at net.dean.jraw.oauth.AccountHelper.switchToUserless (AccountHelper.kt:74)
  at me.saket.dank.reddit.jraw.JrawReddit.<init> (JrawReddit.kt:38)
  at me.saket.dank.reddit.jraw.JrawReddit_Factory.get (JrawReddit_Factory.java:38)
  at me.saket.dank.reddit.jraw.JrawReddit_Factory.get (JrawReddit_Factory.java:12)
  at me.saket.dank.reddit.RedditModule_RedditFactory.get (RedditModule_RedditFactory.java:22)
  at me.saket.dank.reddit.RedditModule_RedditFactory.get (RedditModule_RedditFactory.java:9)
  at dagger.internal.DoubleCheck.get (DoubleCheck.java:47)
  at me.saket.dank.ui.authentication.LoginActivity.onCreate (LoginActivity.java:104)
  at android.app.Activity.performCreate (Activity.java:6309)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1108)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2426)
Potential fix
Index: app/src/main/java/me/saket/dank/reddit/jraw/JrawReddit.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/src/main/java/me/saket/dank/reddit/jraw/JrawReddit.kt	(revision 219a5b71b62eb8ab92be30aef8368980bb585ae9)
+++ app/src/main/java/me/saket/dank/reddit/jraw/JrawReddit.kt	(date 1568132381364)
@@ -1,5 +1,7 @@
 package me.saket.dank.reddit.jraw
 
+import io.reactivex.Completable
+import io.reactivex.schedulers.Schedulers.io
 import io.reactivex.subjects.BehaviorSubject
 import me.saket.dank.reddit.Reddit
 import me.saket.dank.ui.user.UserSessionRepository
@@ -35,7 +37,10 @@
       }
       else -> {
         Timber.i("Switching to userless")
-        accountHelper.switchToUserless()
+        Completable.fromAction {
+          accountHelper.switchToUserless()
+        }.subscribeOn(io())
+          .subscribe()
       }
     }

Problem with login

On Android 8, login flow doesn't work. Attempting to login through webview never redirects to page with input for 2 factor auth code.

Pull down to refresh

With an app so focused on gestures it would be natural to have pull down to refresh working. Please include this and keep this app going!

Synchronize saved posts with Reddit

Describe the bug
Bookmarks don't get registered.

To Reproduce
Steps to reproduce the behavior:

  1. Slide across a post until you see a star
  2. Leave it, to register a post as a bookmark
  3. Login to reddit via Chrome
  4. Check My bookmarks
  5. Bookmark isn't registered

Expected behavior
The bookmarks should show up in original reddit website : reddit.com in the respective profile.

**Smartphone

  • Device: Redmi 4X
  • OS: [e.g. Android 10]

App rebranding

A lot of people didn't like the name Dank for the app. Perhaps it's a good time to change the name to something which would sound more professional? I personally very like the name Seek which someone shared in dank's subreddit previously but I'm open to other ideas.

@saket are you ok with this, or maybe you have other suggestions?
Also while I have a chance do you have any idea how we could work out to make the app available on the play store? I technically could create my own signing keys and upload them under my account (package name would change with rebranding to avoid conflict) but it kind of feels weird to have my name as the developer since you've made almost all of the work with it. (I can contact you somewhere else if you prefer)

Crash after posting comment reply

FATAL EXCEPTION: main
Process: me.saket.dank.debug, PID: 4889
java.lang.AssertionError
	at me.saket.dank.ui.submission.adapter.SubmissionLocalComment$ViewHolder.renderPartialChanges(SubmissionLocalComment.kt:120)
	at me.saket.dank.ui.submission.adapter.SubmissionLocalComment$Adapter.onBindViewHolder(SubmissionLocalComment.kt:154)
	at me.saket.dank.ui.submission.adapter.SubmissionLocalComment$Adapter.onBindViewHolder(SubmissionLocalComment.kt:131)
	at me.saket.dank.ui.submission.adapter.SubmissionCommentsAdapter.onBindViewHolder(SubmissionCommentsAdapter.java:127)
	at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:6714)
	at android.support.v7.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:5647)
	at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5913)
	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5752)
	at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5748)
	at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2232)
	at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1559)
	at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1519)
	at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:614)
	at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3812)
	at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3529)
	at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:4082)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1080)
	at me.saket.dank.widgets.InboxUI.IndependentExpandablePageLayout.onLayout(IndependentExpandablePageLayout.java:36)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1544)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
	at com.android.internal.policy.DecorView.onLayout(DecorView.java:759)
	at android.view.View.layout(View.java:19692)
	at android.view.ViewGroup.layout(ViewGroup.java:6057)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2521)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2230)

Ability to select and copy comment text

Please add a way to select and copy text from comments. Maybe by long pressing at a comment it grants the ability to start selecting text, that seems sensible enough. Or for a start, a simple option in the additional options menu (swipe fully right) to copy the whole comment text.

API compatibility - hidden API usage

https://developer.android.com/about/versions/pie/restrictions-non-sdk-interfaces

W: Accessing hidden field Landroid/app/ActivityThread$ActivityClientRecord;->activity:Landroid/app/Activity; (light greylist, reflection)
W: Accessing hidden field Landroid/app/ActivityThread$ActivityClientRecord;->paused:Z (light greylist, reflection)
W: Accessing hidden field Landroid/app/ActivityThread;->mActivities:Landroid/util/ArrayMap; (light greylist, reflection)
W: Accessing hidden field Landroid/view/LayoutInflater;->mConstructorArgs:[Ljava/lang/Object; (light greylist, reflection)
W: Accessing hidden method Landroid/app/ActivityThread;->currentActivityThread()Landroid/app/ActivityThread; (light greylist, reflection)
W: Accessing hidden method Landroid/app/ActivityThread;->currentPackageName()Ljava/lang/String; (light greylist, reflection)
W: Accessing hidden method Landroid/graphics/drawable/AnimatedVectorDrawable;->reverse()V (dark greylist, reflection)
W: Accessing hidden method Landroid/media/AudioTrack;->getLatency()I (light greylist, reflection)
W: Accessing hidden method Landroid/text/SpannableStringInternal;->charAt(I)C (light greylist, linking)
W: Accessing hidden method Landroid/text/SpannableStringInternal;->getChars(II[CI)V (light greylist, linking)
W: Accessing hidden method Landroid/text/SpannableStringInternal;->length()I (light greylist, linking)
W: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W: Accessing hidden method Landroid/view/View;->getTransitionAlpha()F (light greylist, reflection)
W: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
W: Accessing hidden method Landroid/view/ViewGroup;->suppressLayout(Z)V (light greylist, reflection)
W: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->getAlpnSelectedProtocol()[B (light greylist, reflection)
W: Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setAlpnProtocols([B)V (light greylist, reflection)
W: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
W: Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
W: Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.