mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
#1825 Check for null story text when sharing full story content
This commit is contained in:
parent
96ee184437
commit
fcc7a781b7
1 changed files with 4 additions and 1 deletions
|
@ -17,6 +17,7 @@ import com.newsblur.service.NBSyncReceiver.Companion.UPDATE_METADATA
|
|||
import com.newsblur.service.NBSyncReceiver.Companion.UPDATE_SOCIAL
|
||||
import com.newsblur.service.NBSyncReceiver.Companion.UPDATE_STORY
|
||||
import com.newsblur.service.NBSyncService
|
||||
import com.newsblur.service.OriginalTextService
|
||||
import com.newsblur.util.FeedExt.disableNotification
|
||||
import com.newsblur.util.FeedExt.setNotifyFocus
|
||||
import com.newsblur.util.FeedExt.setNotifyUnread
|
||||
|
@ -333,7 +334,9 @@ class FeedUtils(
|
|||
fun sendStoryFull(story: Story?, context: Context) {
|
||||
if (story == null) return
|
||||
var body = getStoryText(story.storyHash)
|
||||
if (TextUtils.isEmpty(body)) body = getStoryContent(story.storyHash)
|
||||
if (body.isNullOrEmpty() || body == OriginalTextService.NULL_STORY_TEXT) {
|
||||
body = getStoryContent(story.storyHash)
|
||||
}
|
||||
val intent = Intent(Intent.ACTION_SEND)
|
||||
intent.type = "text/plain"
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
|
||||
|
|
Loading…
Add table
Reference in a new issue