parent
fbd722198d
commit
3c68393e04
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
#Sat Mar 04 00:45:41 CST 2017
|
||||
#Sat Mar 04 21:04:01 CST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
#!/usr/bin/env sh
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
|
@ -154,11 +154,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save ( ) {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
@ -49,7 +49,6 @@ goto fail
|
|||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
|
@ -60,11 +59,6 @@ set _SKIP=2
|
|||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
|
|
@ -91,8 +91,6 @@ open class BaseActivity : ChameleonActivity(), IBaseActivity<BaseActivity>, IThe
|
|||
@Inject
|
||||
lateinit var notificationManager: NotificationManagerWrapper
|
||||
@Inject
|
||||
lateinit var mediaLoader: MediaLoaderWrapper
|
||||
@Inject
|
||||
lateinit var userColorNameManager: UserColorNameManager
|
||||
@Inject
|
||||
lateinit var permissionsManager: PermissionsManager
|
||||
|
|
|
@ -266,7 +266,6 @@ class QuickSearchBarActivity : BaseActivity(), OnClickListener, LoaderCallbacks<
|
|||
|
||||
private val requestManager = Glide.with(activity)
|
||||
private val inflater = LayoutInflater.from(activity)
|
||||
private val mediaLoader = activity.mediaLoader
|
||||
private val userColorNameManager = activity.userColorNameManager
|
||||
private val removedPositions = SortableIntList()
|
||||
|
||||
|
|
|
@ -45,8 +45,6 @@ import javax.inject.Inject
|
|||
class ComposeAutoCompleteAdapter(context: Context, val requestManager: RequestManager) : SimpleCursorAdapter(context,
|
||||
R.layout.list_item_auto_complete, null, emptyArray(), intArrayOf(), 0) {
|
||||
|
||||
@Inject
|
||||
lateinit var mediaLoader: MediaLoaderWrapper
|
||||
@Inject
|
||||
lateinit var preferences: SharedPreferencesWrapper
|
||||
@Inject
|
||||
|
|
|
@ -43,8 +43,6 @@ class DraftsAdapter(
|
|||
val requestManager: RequestManager
|
||||
) : SimpleCursorAdapter(context, R.layout.list_item_draft, null, arrayOfNulls<String>(0), IntArray(0), 0) {
|
||||
|
||||
@Inject
|
||||
lateinit var imageLoader: MediaLoaderWrapper
|
||||
@Inject
|
||||
lateinit var preferences: SharedPreferencesWrapper
|
||||
|
||||
|
|
|
@ -53,8 +53,6 @@ class UserAutoCompleteAdapter(
|
|||
val requestManager: RequestManager
|
||||
) : SimpleCursorAdapter(context, R.layout.list_item_auto_complete, null, emptyArray(), intArrayOf(), 0) {
|
||||
|
||||
@Inject
|
||||
lateinit var profileImageLoader: MediaLoaderWrapper
|
||||
@Inject
|
||||
lateinit var preferences: SharedPreferencesWrapper
|
||||
@Inject
|
||||
|
|
|
@ -625,10 +625,8 @@ class AccountsDashboardFragment : BaseFragment(), LoaderCallbacks<AccountsInfo>,
|
|||
private val fragment: AccountsDashboardFragment
|
||||
) : RecyclerPagerAdapter() {
|
||||
|
||||
internal var requestManager: RequestManager = Glide.with(fragment)
|
||||
|
||||
internal var profileImageStyle: Int = fragment.preferences[profileImageStyleKey]
|
||||
internal var mediaLoader: MediaLoaderWrapper = fragment.mediaLoader
|
||||
internal var requestManager: RequestManager = Glide.with(fragment)
|
||||
|
||||
var accounts: Array<AccountDetails>? = null
|
||||
set(value) {
|
||||
|
|
|
@ -40,8 +40,6 @@ open class BaseFragment : Fragment(), IBaseFragment<BaseFragment> {
|
|||
@Inject
|
||||
lateinit var readStateManager: ReadStateManager
|
||||
@Inject
|
||||
lateinit var mediaLoader: MediaLoaderWrapper
|
||||
@Inject
|
||||
lateinit var bus: Bus
|
||||
@Inject
|
||||
lateinit var asyncTaskManager: AsyncTaskManager
|
||||
|
|
|
@ -377,7 +377,7 @@ class MessageConversationInfoFragment : BaseFragment(), IToolBarSupportFragment,
|
|||
this.delete_always = true
|
||||
})
|
||||
val uploadResult = UpdateStatusTask.uploadAllMediaShared(context,
|
||||
fragment.mediaLoader, upload, account, media, null, true, null)
|
||||
upload, account, media, null, true, null)
|
||||
deleteAlways = uploadResult.deleteAlways
|
||||
val avatarId = uploadResult.ids.first()
|
||||
val result = microBlog.updateDmConversationAvatar(conversationId, avatarId)
|
||||
|
|
|
@ -20,8 +20,6 @@ abstract class BaseIntentService(tag: String) : IntentService(tag) {
|
|||
@Inject
|
||||
lateinit var extractor: Extractor
|
||||
@Inject
|
||||
lateinit var mediaLoader: MediaLoaderWrapper
|
||||
@Inject
|
||||
lateinit var userColorNameManager: UserColorNameManager
|
||||
|
||||
override fun onCreate() {
|
||||
|
|
|
@ -291,10 +291,9 @@ class UpdateStatusTask(
|
|||
}
|
||||
val media = statusUpdate.media.first()
|
||||
try {
|
||||
return getBodyFromMedia(context, mediaLoader, media, sizeLimit, false,
|
||||
ContentLengthInputStream.ReadListener { length, position ->
|
||||
stateCallback.onUploadingProgressChanged(-1, position, length)
|
||||
}).use { mediaBody ->
|
||||
return getBodyFromMedia(context, media, sizeLimit, false, ContentLengthInputStream.ReadListener { length, position ->
|
||||
stateCallback.onUploadingProgressChanged(-1, position, length)
|
||||
}).use { mediaBody ->
|
||||
val photoUpdate = PhotoStatusUpdate(mediaBody.body, pendingUpdate.overrideTexts[updateIndex])
|
||||
return@use microBlog.uploadPhoto(photoUpdate)
|
||||
}
|
||||
|
@ -326,8 +325,7 @@ class UpdateStatusTask(
|
|||
mediaIds = pendingUpdate.sharedMediaIds
|
||||
} else {
|
||||
val (ids, deleteOnSuccess, deleteAlways) = uploadAllMediaShared(context,
|
||||
mediaLoader, upload, account, update.media, ownerIds, true,
|
||||
stateCallback)
|
||||
upload, account, update.media, ownerIds, true, stateCallback)
|
||||
mediaIds = ids
|
||||
deleteOnSuccess.addAllTo(pendingUpdate.deleteOnSuccess)
|
||||
deleteAlways.addAllTo(pendingUpdate.deleteAlways)
|
||||
|
@ -342,8 +340,7 @@ class UpdateStatusTask(
|
|||
// TODO use their native API
|
||||
val upload = account.newMicroBlogInstance(context, cls = TwitterUpload::class.java)
|
||||
val (ids, deleteOnSuccess, deleteAlways) = uploadAllMediaShared(context,
|
||||
mediaLoader, upload, account, update.media, ownerIds, false,
|
||||
stateCallback)
|
||||
upload, account, update.media, ownerIds, false, stateCallback)
|
||||
mediaIds = ids
|
||||
deleteOnSuccess.addAllTo(pendingUpdate.deleteOnSuccess)
|
||||
deleteAlways.addAllTo(pendingUpdate.deleteAlways)
|
||||
|
@ -632,7 +629,6 @@ class UpdateStatusTask(
|
|||
@Throws(UploadException::class)
|
||||
fun uploadAllMediaShared(
|
||||
context: Context,
|
||||
mediaLoader: MediaLoaderWrapper,
|
||||
upload: TwitterUpload,
|
||||
account: AccountDetails,
|
||||
media: Array<ParcelableMediaUpdate>,
|
||||
|
@ -648,8 +644,8 @@ class UpdateStatusTask(
|
|||
var body: MediaStreamBody? = null
|
||||
try {
|
||||
val sizeLimit = account.mediaSizeLimit
|
||||
body = getBodyFromMedia(context, mediaLoader, media, sizeLimit,
|
||||
chucked, ContentLengthInputStream.ReadListener { length, position ->
|
||||
body = getBodyFromMedia(context, media, sizeLimit, chucked,
|
||||
ContentLengthInputStream.ReadListener { length, position ->
|
||||
callback?.onUploadingProgressChanged(index, position, length)
|
||||
})
|
||||
val mediaUploadEvent = MediaUploadEvent.create(context, media)
|
||||
|
@ -692,7 +688,6 @@ class UpdateStatusTask(
|
|||
@Throws(IOException::class)
|
||||
fun getBodyFromMedia(
|
||||
context: Context,
|
||||
mediaLoader: MediaLoaderWrapper,
|
||||
media: ParcelableMediaUpdate,
|
||||
sizeLimit: SizeLimit? = null,
|
||||
chucked: Boolean,
|
||||
|
|
|
@ -112,7 +112,7 @@ class SendMessageTask(
|
|||
if (message.media.isNotNullOrEmpty()) {
|
||||
val upload = account.newMicroBlogInstance(context, cls = TwitterUpload::class.java)
|
||||
val uploadResult = UpdateStatusTask.uploadAllMediaShared(context,
|
||||
mediaLoader, upload, account, message.media, null, true, null)
|
||||
upload, account, message.media, null, true, null)
|
||||
newDm.setMediaId(uploadResult.ids[0])
|
||||
deleteAlways = uploadResult.deleteAlways
|
||||
deleteOnSuccess = uploadResult.deleteOnSuccess
|
||||
|
@ -149,7 +149,7 @@ class SendMessageTask(
|
|||
if (message.media.isNotNullOrEmpty()) {
|
||||
val upload = account.newMicroBlogInstance(context, cls = TwitterUpload::class.java)
|
||||
val uploadResult = UpdateStatusTask.uploadAllMediaShared(context,
|
||||
mediaLoader, upload, account, message.media, null, true, null)
|
||||
upload, account, message.media, null, true, null)
|
||||
mediaId = uploadResult.ids[0]
|
||||
deleteAlways = uploadResult.deleteAlways
|
||||
deleteOnSuccess = uploadResult.deleteOnSuccess
|
||||
|
|
Loading…
Reference in New Issue