fixed some compile warnings

updated travis config
This commit is contained in:
Mariotaku Lee 2017-03-02 16:44:48 +08:00
parent 23b889fe1b
commit a48efc6b89
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
15 changed files with 25 additions and 25 deletions

View File

@ -77,7 +77,7 @@ before_script:
# Validate if patches work
- patch --dry-run -d twidere < twidere/patches/remove_closed_source_dependencies.patch
script: ./gradlew build --no-daemon --stacktrace
script: GRADLE_OPTS="-Dkotlin.incremental=false" ./gradlew build --no-daemon --stacktrace
deploy:
provider: releases

View File

@ -295,7 +295,7 @@ open class BaseActivity : ChameleonActivity(), IBaseActivity<BaseActivity>, IThe
override fun onCreateView(parent: View?, name: String, context: Context, attrs: AttributeSet): View? {
// Fix for https://github.com/afollestad/app-theme-engine/issues/109
if (context !== this) {
if (context != this) {
val delegate = delegate
var view: View? = delegate.createView(parent, name, context, attrs)
if (view == null) {

View File

@ -70,10 +70,10 @@ class ParcelableGroupsAdapter(
override fun getItemCount(): Int {
val position = loadMoreIndicatorPosition
var count = groupsCount
if (position and ILoadMoreSupportAdapter.START !== 0L) {
if (position and ILoadMoreSupportAdapter.START != 0L) {
count++
}
if (position and ILoadMoreSupportAdapter.END !== 0L) {
if (position and ILoadMoreSupportAdapter.END != 0L) {
count++
}
return count
@ -119,7 +119,7 @@ class ParcelableGroupsAdapter(
}
override fun getItemViewType(position: Int): Int {
if (loadMoreIndicatorPosition and ILoadMoreSupportAdapter.START !== 0L && position == 0) {
if (loadMoreIndicatorPosition and ILoadMoreSupportAdapter.START != 0L && position == 0) {
return ITEM_VIEW_TYPE_LOAD_INDICATOR
}
if (position == groupsCount) {

View File

@ -63,10 +63,10 @@ class ParcelableUserListsAdapter(
override fun getItemCount(): Int {
val position = loadMoreIndicatorPosition
var count = userListsCount
if (position and ILoadMoreSupportAdapter.START !== 0L) {
if (position and ILoadMoreSupportAdapter.START != 0L) {
count++
}
if (position and ILoadMoreSupportAdapter.END !== 0L) {
if (position and ILoadMoreSupportAdapter.END != 0L) {
count++
}
return count
@ -110,7 +110,7 @@ class ParcelableUserListsAdapter(
}
override fun getItemViewType(position: Int): Int {
if (loadMoreIndicatorPosition and ILoadMoreSupportAdapter.START !== 0L && position == 0) {
if (loadMoreIndicatorPosition and ILoadMoreSupportAdapter.START != 0L && position == 0) {
return ITEM_VIEW_TYPE_LOAD_INDICATOR
}
if (position == userListsCount) {

View File

@ -63,10 +63,10 @@ class ParcelableUsersAdapter(
override fun getItemCount(): Int {
val position = loadMoreIndicatorPosition
var count = userCount
if (position and ILoadMoreSupportAdapter.START !== 0L) {
if (position and ILoadMoreSupportAdapter.START != 0L) {
count++
}
if (position and ILoadMoreSupportAdapter.END !== 0L) {
if (position and ILoadMoreSupportAdapter.END != 0L) {
count++
}
return count
@ -82,7 +82,7 @@ class ParcelableUsersAdapter(
get() {
val position = loadMoreIndicatorPosition
var start = 0
if (position and ILoadMoreSupportAdapter.START !== 0L) {
if (position and ILoadMoreSupportAdapter.START != 0L) {
start += 1
}
return start
@ -150,7 +150,7 @@ class ParcelableUsersAdapter(
}
override fun getItemViewType(position: Int): Int {
if (loadMoreIndicatorPosition and ILoadMoreSupportAdapter.START !== 0L && position == 0) {
if (loadMoreIndicatorPosition and ILoadMoreSupportAdapter.START != 0L && position == 0) {
return ITEM_VIEW_TYPE_LOAD_INDICATOR
}
if (position == userCount) {

View File

@ -61,9 +61,9 @@ class SelectableUsersAdapter(
override fun getItemCount(): Int {
val position = loadMoreIndicatorPosition
itemCounts[0] = if (position and ILoadMoreSupportAdapter.START !== 0L) 1 else 0
itemCounts[0] = if (position and ILoadMoreSupportAdapter.START != 0L) 1 else 0
itemCounts[1] = userCount
itemCounts[2] = if (position and ILoadMoreSupportAdapter.END !== 0L) 1 else 0
itemCounts[2] = if (position and ILoadMoreSupportAdapter.END != 0L) 1 else 0
return itemCounts.itemCount
}
@ -119,7 +119,7 @@ class SelectableUsersAdapter(
get() {
val position = loadMoreIndicatorPosition
var start = 0
if (position and ILoadMoreSupportAdapter.START !== 0L) {
if (position and ILoadMoreSupportAdapter.START != 0L) {
start += 1
}
return start

View File

@ -140,7 +140,7 @@ abstract class CursorActivitiesFragment : AbsActivitiesFragment() {
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L || refreshing) return
if (position and ILoadMoreSupportAdapter.START != 0L || refreshing) return
super.onLoadMoreContents(position)
if (position == 0L) return
getActivities(object : SimpleRefreshTaskParam() {

View File

@ -174,7 +174,7 @@ abstract class CursorStatusesFragment : AbsStatusesFragment() {
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L) return
if (position and ILoadMoreSupportAdapter.START != 0L) return
super.onLoadMoreContents(position)
if (position == 0L) return
getStatuses(object : SimpleRefreshTaskParam() {

View File

@ -60,7 +60,7 @@ abstract class CursorUsersListFragment : ParcelableUsersFragment() {
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L) return
if (position and ILoadMoreSupportAdapter.START != 0L) return
super.onLoadMoreContents(position)
if (position == 0L) return
val loaderArgs = Bundle(arguments)

View File

@ -93,7 +93,7 @@ abstract class ParcelableGroupsFragment : AbsContentListRecyclerViewFragment<Par
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L) return
if (position and ILoadMoreSupportAdapter.START != 0L) return
super.onLoadMoreContents(position)
if (position == 0L) return
val loaderArgs = Bundle(arguments)

View File

@ -148,7 +148,7 @@ abstract class ParcelableStatusesFragment : AbsStatusesFragment() {
override fun onLoadMoreContents(position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L || refreshing) return
if (position and ILoadMoreSupportAdapter.START != 0L || refreshing) return
super.onLoadMoreContents(position)
if (position == 0L) return
// Load the last item

View File

@ -99,7 +99,7 @@ abstract class ParcelableUserListsFragment : AbsContentListRecyclerViewFragment<
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L) return
if (position and ILoadMoreSupportAdapter.START != 0L) return
super.onLoadMoreContents(position)
if (position == 0L) return
val loaderArgs = Bundle(arguments)

View File

@ -57,7 +57,7 @@ class SearchUsersFragment : ParcelableUsersFragment() {
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L) return
if (position and ILoadMoreSupportAdapter.START != 0L) return
super.onLoadMoreContents(position)
if (position == 0L) return
val loaderArgs = Bundle(arguments)

View File

@ -515,12 +515,12 @@ class StatusFragment : BaseFragment(), LoaderCallbacks<SingleResponse<Parcelable
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
if (!hasMoreConversation) return
if (position and ILoadMoreSupportAdapter.START !== 0L) {
if (position and ILoadMoreSupportAdapter.START != 0L) {
val start = adapter.getIndexStart(StatusAdapter.ITEM_IDX_CONVERSATION)
val status = adapter.getStatus(start)
if (status == null || status.in_reply_to_status_id == null) return
loadConversation(status, null, status.id)
} else if (position and ILoadMoreSupportAdapter.END !== 0L) {
} else if (position and ILoadMoreSupportAdapter.END != 0L) {
val start = adapter.getIndexStart(StatusAdapter.ITEM_IDX_CONVERSATION)
val status = adapter.getStatus(start + adapter.statusCount - 1) ?: return
loadConversation(status, status.id, null)

View File

@ -156,7 +156,7 @@ abstract class BaseFiltersImportFragment : AbsContentListRecyclerViewFragment<Se
override fun onLoadMoreContents(@IndicatorPosition position: Long) {
// Only supports load from end, skip START flag
if (position and ILoadMoreSupportAdapter.START !== 0L) return
if (position and ILoadMoreSupportAdapter.START != 0L) return
super.onLoadMoreContents(position)
if (position == 0L) return
val loaderArgs = Bundle(arguments)