aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-10-09 17:45:51 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-10-09 18:09:01 +0900
commitc86532ef6d337d2b16f8bc29b70205677d571683 (patch)
treebcb23137c2eaa000e2aced154f21b1b6461caf3e /app/src/main/java
parentbe40171c1a4ac855122768f2ea892f695d4cb787 (diff)
downloadSmileEssence-c86532ef6d337d2b16f8bc29b70205677d571683.tar.gz
reinit
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/Application.kt32
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/World.kt4
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/activity/EditExtractionActivity.kt28
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/activity/LicenseActivity.kt26
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/activity/MainActivity.kt30
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/activity/ManageAccountsActivity.kt38
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/activity/OAuthActivity.kt29
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/activity/SettingActivity.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/command/Command.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/command/CommandAddHashtag.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/command/CommandOpenURL.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/command/CommandOpenUserDetail.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/data/Account.kt40
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/data/ImageCache.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/data/PostState.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/entity/DirectMessage.kt3
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/entity/Event.kt2
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/entity/Tweet.kt14
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/entity/User.kt2
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/logging/Logger.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/preference/UserPreferenceHelper.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/twitter/UserStreamListener.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/twitter/task/TimelineTask.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/twitter/task/Tweets.kt3
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/util/BitmapOptimizer.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/util/BitmapThumbnailTask.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/util/BitmapURLTask.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/util/StringUtils.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/util/SystemServiceHelper.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/util/UIHandler.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/DialogHelper.kt29
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/SettingFragment.kt29
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt6
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt28
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt2
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt4
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/ConfirmDialogFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/DisposeDialog.kt27
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/EditTextDialogFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/MessageDetailDialogFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/SendMessageDialogFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt28
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/TalkChainDialogFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/listener/ListItemClickListener.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/CustomListFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/HistoryFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/HomeFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/MentionsFragment.kt26
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/MessagesFragment.kt24
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/PostFragment.kt31
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/SearchFragment.kt28
-rw-r--r--app/src/main/java/net/lacolaco/smileessence/view/page/UserListFragment.kt24
55 files changed, 57 insertions, 1176 deletions
diff --git a/app/src/main/java/net/lacolaco/smileessence/Application.kt b/app/src/main/java/net/lacolaco/smileessence/Application.kt
index 9225d1c0..f83c898e 100644
--- a/app/src/main/java/net/lacolaco/smileessence/Application.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/Application.kt
@@ -1,40 +1,12 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence
import android.support.annotation.StringRes
import android.widget.Toast
-import com.crashlytics.android.Crashlytics
-import com.crashlytics.android.core.CrashlyticsCore
import com.squareup.leakcanary.LeakCanary
-import io.fabric.sdk.android.Fabric
import net.lacolaco.smileessence.data.Account
import net.lacolaco.smileessence.data.OrmaHolder
-
import java.lang.ref.WeakReference
-import java.util.HashMap
+import java.util.*
class Application : android.app.Application() {
override fun onCreate() {
@@ -43,8 +15,6 @@ class Application : android.app.Application() {
return
LeakCanary.install(this)
- Fabric.with(this, Crashlytics.Builder().core(CrashlyticsCore.Builder().disabled(BuildConfig.DEBUG).build()).build())
-
instance = this
OrmaHolder.initialize(this)
Account.load()
diff --git a/app/src/main/java/net/lacolaco/smileessence/World.kt b/app/src/main/java/net/lacolaco/smileessence/World.kt
index 885a8a30..29694bc1 100644
--- a/app/src/main/java/net/lacolaco/smileessence/World.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/World.kt
@@ -18,9 +18,9 @@ import net.lacolaco.smileessence.twitter.UserStreamListener
import net.lacolaco.smileessence.twitter.task.Accounts
import net.lacolaco.smileessence.twitter.task.Searches
import net.lacolaco.smileessence.twitter.task.Users
-import net.lacolaco.smileessence.util.*
+import net.lacolaco.smileessence.util.BackgroundTask
+import net.lacolaco.smileessence.util.UIHandler
import twitter4j.TwitterStream
-
import java.lang.ref.WeakReference
import java.util.*
import java.util.concurrent.ConcurrentHashMap
diff --git a/app/src/main/java/net/lacolaco/smileessence/activity/EditExtractionActivity.kt b/app/src/main/java/net/lacolaco/smileessence/activity/EditExtractionActivity.kt
index 1afbf6b9..e83bd5b9 100644
--- a/app/src/main/java/net/lacolaco/smileessence/activity/EditExtractionActivity.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/activity/EditExtractionActivity.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.activity
import android.app.Activity
@@ -85,9 +61,9 @@ class EditExtractionActivity : Activity() {
return true
}
- override fun onItemCheckedStateChanged(p0: ActionMode?, p1: Int, p2: Long, p3: Boolean) { }
+ override fun onItemCheckedStateChanged(p0: ActionMode?, p1: Int, p2: Long, p3: Boolean) {}
override fun onPrepareActionMode(p0: ActionMode?, p1: Menu?) = false
- override fun onDestroyActionMode(p0: ActionMode?) { }
+ override fun onDestroyActionMode(p0: ActionMode?) {}
})
}
diff --git a/app/src/main/java/net/lacolaco/smileessence/activity/LicenseActivity.kt b/app/src/main/java/net/lacolaco/smileessence/activity/LicenseActivity.kt
index 6a0630bc..cc1f1b19 100644
--- a/app/src/main/java/net/lacolaco/smileessence/activity/LicenseActivity.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/activity/LicenseActivity.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.activity
import android.app.Activity
@@ -75,4 +51,4 @@ class LicenseActivity : Activity() {
linear_license_files.addView(name)
}
}
-} \ No newline at end of file
+}
diff --git a/app/src/main/java/net/lacolaco/smileessence/activity/MainActivity.kt b/app/src/main/java/net/lacolaco/smileessence/activity/MainActivity.kt
index 21f96254..e2487a58 100644
--- a/app/src/main/java/net/lacolaco/smileessence/activity/MainActivity.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/activity/MainActivity.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.activity
import android.app.Activity
@@ -38,7 +14,9 @@ import android.view.WindowManager
import android.widget.ImageView
import de.keyboardsurfer.android.widget.crouton.Crouton
import kotlinx.android.synthetic.main.layout_main.*
-import net.lacolaco.smileessence.*
+import net.lacolaco.smileessence.Application
+import net.lacolaco.smileessence.R
+import net.lacolaco.smileessence.World
import net.lacolaco.smileessence.data.ExtractionWord
import net.lacolaco.smileessence.entity.Tweet
import net.lacolaco.smileessence.logging.Logger
@@ -118,7 +96,7 @@ class MainActivity : Activity(), ViewPager.OnPageChangeListener {
private fun processIntent(intent: Intent) {
val uri = intent.getParcelableExtra<Uri>(KEY_ORIGINAL_DATA)
- if (uri != null){
+ if (uri != null) {
if (uri.host == "twitter.com") {
// /share and /intent/tweet: don't accept status parameter
val postMatcher = TWITTER_POST_PATTERN.matcher(uri.path)
diff --git a/app/src/main/java/net/lacolaco/smileessence/activity/ManageAccountsActivity.kt b/app/src/main/java/net/lacolaco/smileessence/activity/ManageAccountsActivity.kt
index a279afed..49453c9c 100644
--- a/app/src/main/java/net/lacolaco/smileessence/activity/ManageAccountsActivity.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/activity/ManageAccountsActivity.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.activity
import android.app.Activity
@@ -35,7 +11,12 @@ import android.view.Menu
import android.view.MenuItem
import android.view.View
import android.view.ViewGroup
-import android.widget.*
+import android.widget.AdapterView
+import android.widget.BaseAdapter
+import kotlinx.android.synthetic.main.layout_edit_list.*
+import kotlinx.android.synthetic.main.list_item_account.view.*
+import kotlinx.coroutines.experimental.android.UI
+import kotlinx.coroutines.experimental.async
import net.lacolaco.smileessence.Application
import net.lacolaco.smileessence.R
import net.lacolaco.smileessence.World
@@ -43,14 +24,9 @@ import net.lacolaco.smileessence.data.Account
import net.lacolaco.smileessence.data.ImageCache
import net.lacolaco.smileessence.logging.Logger
import net.lacolaco.smileessence.view.dialog.ConfirmDialogFragment
-import kotlinx.android.synthetic.main.layout_edit_list.*
-import kotlinx.android.synthetic.main.list_item_account.view.*
-import kotlinx.coroutines.experimental.android.UI
-import kotlinx.coroutines.experimental.async
import org.jetbrains.anko.coroutines.experimental.bg
import org.jetbrains.anko.startActivityForResult
-
-import java.util.ArrayList
+import java.util.*
class ManageAccountsActivity : Activity() {
private val adapter by lazy { EditAccountsAdapter() }
diff --git a/app/src/main/java/net/lacolaco/smileessence/activity/OAuthActivity.kt b/app/src/main/java/net/lacolaco/smileessence/activity/OAuthActivity.kt
index e7b92447..5e946fc9 100644
--- a/app/src/main/java/net/lacolaco/smileessence/activity/OAuthActivity.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/activity/OAuthActivity.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.activity
import android.app.Activity
@@ -34,6 +10,7 @@ import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.async
import net.lacolaco.smileessence.Application
import net.lacolaco.smileessence.R
+import net.lacolaco.smileessence.logging.Logger
import org.jetbrains.anko.coroutines.experimental.bg
import twitter4j.TwitterFactory
import twitter4j.auth.RequestToken
@@ -85,7 +62,9 @@ class OAuthActivity : Activity(), TextWatcher {
tokenSecret = requestToken.tokenSecret
textView_oauth_link.text = requestToken.authorizationURL
} catch (e: Exception) {
+ Logger.error(e)
Application.toast(R.string.notice_error_authenticate_request)
+ setResult(Activity.RESULT_CANCELED)
finish()
}
}
@@ -113,4 +92,4 @@ class OAuthActivity : Activity(), TextWatcher {
private val KEY_REQUEST_TOKEN = "reqToken"
private val KEY_REQUEST_TOKEN_SECRET = "reqTokenSecret"
}
-} \ No newline at end of file
+}
diff --git a/app/src/main/java/net/lacolaco/smileessence/activity/SettingActivity.kt b/app/src/main/java/net/lacolaco/smileessence/activity/SettingActivity.kt
index 9fb148ea..d7f1101f 100644
--- a/app/src/main/java/net/lacolaco/smileessence/activity/SettingActivity.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/activity/SettingActivity.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.activity
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/command/Command.kt b/app/src/main/java/net/lacolaco/smileessence/command/Command.kt
index 98183dc7..fc80a81b 100644
--- a/app/src/main/java/net/lacolaco/smileessence/command/Command.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/command/Command.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.command
import net.lacolaco.smileessence.activity.MainActivity
diff --git a/app/src/main/java/net/lacolaco/smileessence/command/CommandAddHashtag.kt b/app/src/main/java/net/lacolaco/smileessence/command/CommandAddHashtag.kt
index 5d8077d5..9565f4c0 100644
--- a/app/src/main/java/net/lacolaco/smileessence/command/CommandAddHashtag.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/command/CommandAddHashtag.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.command
import net.lacolaco.smileessence.activity.MainActivity
diff --git a/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenURL.kt b/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenURL.kt
index 4ca02660..42bc8b7e 100644
--- a/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenURL.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenURL.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.command
import net.lacolaco.smileessence.activity.MainActivity
diff --git a/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenUserDetail.kt b/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenUserDetail.kt
index a835ffa1..a37b182e 100644
--- a/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenUserDetail.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/command/CommandOpenUserDetail.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.command
import net.lacolaco.smileessence.R
diff --git a/app/src/main/java/net/lacolaco/smileessence/data/Account.kt b/app/src/main/java/net/lacolaco/smileessence/data/Account.kt
index e217edbb..4f05268f 100644
--- a/app/src/main/java/net/lacolaco/smileessence/data/Account.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/data/Account.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.data
import com.github.gfx.android.orma.annotation.Column
@@ -53,13 +29,13 @@ class Account {
val user: User by lazy { User.fetch(userId) ?: User._makeSkeleton(userId, screenName!!) }
val twitter: Twitter
- get() {
- val cb = ConfigurationBuilder()
- cb.setTweetModeExtended(true)
- val twitter = TwitterFactory(cb.build()).instance
- twitter.oAuthAccessToken = AccessToken(oauthToken, oauthTokenSecret)
- return twitter
- }
+ get() {
+ val cb = ConfigurationBuilder()
+ cb.setTweetModeExtended(true)
+ val twitter = TwitterFactory(cb.build()).instance
+ twitter.oAuthAccessToken = AccessToken(oauthToken, oauthTokenSecret)
+ return twitter
+ }
val twitterStream: TwitterStream
get() {
@@ -121,4 +97,4 @@ class Account {
return account
}
}
-} \ No newline at end of file
+}
diff --git a/app/src/main/java/net/lacolaco/smileessence/data/ImageCache.kt b/app/src/main/java/net/lacolaco/smileessence/data/ImageCache.kt
index 84e2b7b6..264dcd62 100644
--- a/app/src/main/java/net/lacolaco/smileessence/data/ImageCache.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/data/ImageCache.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.data
import android.graphics.Bitmap
diff --git a/app/src/main/java/net/lacolaco/smileessence/data/PostState.kt b/app/src/main/java/net/lacolaco/smileessence/data/PostState.kt
index 4bc07443..74a09179 100644
--- a/app/src/main/java/net/lacolaco/smileessence/data/PostState.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/data/PostState.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.data
import net.lacolaco.smileessence.activity.MainActivity
diff --git a/app/src/main/java/net/lacolaco/smileessence/entity/DirectMessage.kt b/app/src/main/java/net/lacolaco/smileessence/entity/DirectMessage.kt
index 290773aa..013d5f5a 100644
--- a/app/src/main/java/net/lacolaco/smileessence/entity/DirectMessage.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/entity/DirectMessage.kt
@@ -1,7 +1,6 @@
package net.lacolaco.smileessence.entity
-import java.util.Date
-import java.util.HashMap
+import java.util.*
class DirectMessage private constructor(message: twitter4j.DirectMessage) : EntitySupport(message), IdObject {
override val id: Long = message.id
diff --git a/app/src/main/java/net/lacolaco/smileessence/entity/Event.kt b/app/src/main/java/net/lacolaco/smileessence/entity/Event.kt
index d7d7a9cd..79741571 100644
--- a/app/src/main/java/net/lacolaco/smileessence/entity/Event.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/entity/Event.kt
@@ -1,6 +1,6 @@
package net.lacolaco.smileessence.entity
-import java.util.Date
+import java.util.*
class Event constructor(val event: EnumEvent, val source: User, val targetObject: Tweet? = null) {
val createdAt: Date = Date()
diff --git a/app/src/main/java/net/lacolaco/smileessence/entity/Tweet.kt b/app/src/main/java/net/lacolaco/smileessence/entity/Tweet.kt
index 2a7d390c..907c0a21 100644
--- a/app/src/main/java/net/lacolaco/smileessence/entity/Tweet.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/entity/Tweet.kt
@@ -47,8 +47,8 @@ class Tweet private constructor(st: twitter4j.Status, myUserId: Long) : EntitySu
retweetedTweet.retweets.put(myUserId, status.currentUserRetweetId)
}
} else {
- favoriteCount = status.favoriteCount
- retweetCount = status.retweetCount
+ favoriteCount = status.favoriteCount
+ retweetCount = status.retweetCount
if (status.isFavorited)
favoriters.add(myUserId)
@@ -98,11 +98,11 @@ class Tweet private constructor(st: twitter4j.Status, myUserId: Long) : EntitySu
}
// override EntitySupport
- override val mentions: List<String> = originalTweet@super.mentions
- override val hashtags: List<String> = originalTweet@super.hashtags
- override val mediaUrls: List<String> = originalTweet@super.mediaUrls
- override val urlsExpanded: List<String> = originalTweet@super.urlsExpanded
- override val symbols: List<String> = originalTweet@super.symbols
+ override val mentions: List<String> = originalTweet@ super.mentions
+ override val hashtags: List<String> = originalTweet@ super.hashtags
+ override val mediaUrls: List<String> = originalTweet@ super.mediaUrls
+ override val urlsExpanded: List<String> = originalTweet@ super.urlsExpanded
+ override val symbols: List<String> = originalTweet@ super.symbols
companion object {
private val storage = HashMap<Long, Tweet>()
diff --git a/app/src/main/java/net/lacolaco/smileessence/entity/User.kt b/app/src/main/java/net/lacolaco/smileessence/entity/User.kt
index f7edf9c1..8dd05d3d 100644
--- a/app/src/main/java/net/lacolaco/smileessence/entity/User.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/entity/User.kt
@@ -1,6 +1,6 @@
package net.lacolaco.smileessence.entity
-import java.util.HashMap
+import java.util.*
class User private constructor(override val id: Long, screenName: String) : IdObject {
var screenName = screenName
diff --git a/app/src/main/java/net/lacolaco/smileessence/logging/Logger.kt b/app/src/main/java/net/lacolaco/smileessence/logging/Logger.kt
index db21abe1..4972d6fc 100644
--- a/app/src/main/java/net/lacolaco/smileessence/logging/Logger.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/logging/Logger.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.logging
import android.util.Log
diff --git a/app/src/main/java/net/lacolaco/smileessence/preference/UserPreferenceHelper.kt b/app/src/main/java/net/lacolaco/smileessence/preference/UserPreferenceHelper.kt
index ca74f904..4f175026 100644
--- a/app/src/main/java/net/lacolaco/smileessence/preference/UserPreferenceHelper.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/preference/UserPreferenceHelper.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.preference
import android.content.SharedPreferences
diff --git a/app/src/main/java/net/lacolaco/smileessence/twitter/UserStreamListener.kt b/app/src/main/java/net/lacolaco/smileessence/twitter/UserStreamListener.kt
index 80a0c808..21118d24 100644
--- a/app/src/main/java/net/lacolaco/smileessence/twitter/UserStreamListener.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/twitter/UserStreamListener.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.twitter
import net.lacolaco.smileessence.R
diff --git a/app/src/main/java/net/lacolaco/smileessence/twitter/task/TimelineTask.kt b/app/src/main/java/net/lacolaco/smileessence/twitter/task/TimelineTask.kt
index d6b2c054..a1456e24 100644
--- a/app/src/main/java/net/lacolaco/smileessence/twitter/task/TimelineTask.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/twitter/task/TimelineTask.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.twitter.task
import net.lacolaco.smileessence.util.BackgroundTask
diff --git a/app/src/main/java/net/lacolaco/smileessence/twitter/task/Tweets.kt b/app/src/main/java/net/lacolaco/smileessence/twitter/task/Tweets.kt
index 185c602c..ddbd4790 100644
--- a/app/src/main/java/net/lacolaco/smileessence/twitter/task/Tweets.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/twitter/task/Tweets.kt
@@ -10,11 +10,10 @@ import net.lacolaco.smileessence.logging.Logger
import net.lacolaco.smileessence.util.BackgroundTask
import twitter4j.StatusUpdate
import twitter4j.TwitterException
-
import java.io.File
import java.io.FileOutputStream
import java.io.IOException
-import java.util.ArrayList
+import java.util.*
class Tweets {
class GetTask(private val account: Account, private val id: Long) : BackgroundTask<Tweet, Void>() {
diff --git a/app/src/main/java/net/lacolaco/smileessence/util/BitmapOptimizer.kt b/app/src/main/java/net/lacolaco/smileessence/util/BitmapOptimizer.kt
index 6ef88632..9b2fa385 100644
--- a/app/src/main/java/net/lacolaco/smileessence/util/BitmapOptimizer.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/util/BitmapOptimizer.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.util
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/util/BitmapThumbnailTask.kt b/app/src/main/java/net/lacolaco/smileessence/util/BitmapThumbnailTask.kt
index 8ea16838..4b70b579 100644
--- a/app/src/main/java/net/lacolaco/smileessence/util/BitmapThumbnailTask.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/util/BitmapThumbnailTask.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.util
import android.graphics.Bitmap
diff --git a/app/src/main/java/net/lacolaco/smileessence/util/BitmapURLTask.kt b/app/src/main/java/net/lacolaco/smileessence/util/BitmapURLTask.kt
index 910d5d60..65ca7b53 100644
--- a/app/src/main/java/net/lacolaco/smileessence/util/BitmapURLTask.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/util/BitmapURLTask.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.util
import android.graphics.Bitmap
diff --git a/app/src/main/java/net/lacolaco/smileessence/util/StringUtils.kt b/app/src/main/java/net/lacolaco/smileessence/util/StringUtils.kt
index 04765583..4d5f6524 100644
--- a/app/src/main/java/net/lacolaco/smileessence/util/StringUtils.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/util/StringUtils.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2015 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.util
import java.text.SimpleDateFormat
diff --git a/app/src/main/java/net/lacolaco/smileessence/util/SystemServiceHelper.kt b/app/src/main/java/net/lacolaco/smileessence/util/SystemServiceHelper.kt
index adb0a642..3fb0ac4d 100644
--- a/app/src/main/java/net/lacolaco/smileessence/util/SystemServiceHelper.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/util/SystemServiceHelper.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.util
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/util/UIHandler.kt b/app/src/main/java/net/lacolaco/smileessence/util/UIHandler.kt
index 5c9898a2..0cc4ec54 100644
--- a/app/src/main/java/net/lacolaco/smileessence/util/UIHandler.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/util/UIHandler.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.util
import android.os.Handler
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/DialogHelper.kt b/app/src/main/java/net/lacolaco/smileessence/view/DialogHelper.kt
index c9b4a428..2e4109b2 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/DialogHelper.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/DialogHelper.kt
@@ -1,35 +1,8 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view
import android.app.Activity
import net.lacolaco.smileessence.view.dialog.StackableDialogFragment
-
-import java.util.ArrayList
-import java.util.LinkedHashSet
-import java.util.UUID
+import java.util.*
/**
* DialogFragment のタグの一覧を保持し「全てのダイアログを閉じる」機能を提供するヘルパークラス
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/SettingFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/SettingFragment.kt
index e90963bc..af69e40f 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/SettingFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/SettingFragment.kt
@@ -1,44 +1,19 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view
import android.app.AlertDialog
import android.content.SharedPreferences
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener
import android.os.Bundle
import android.preference.EditTextPreference
import android.preference.ListPreference
import android.preference.Preference
import android.preference.PreferenceFragment
import android.text.TextUtils
+import kotlinx.android.synthetic.main.dialog_app_info.view.*
import net.lacolaco.smileessence.Application
import net.lacolaco.smileessence.BuildConfig
import net.lacolaco.smileessence.R
import net.lacolaco.smileessence.activity.LicenseActivity
-
-import android.content.SharedPreferences.OnSharedPreferenceChangeListener
-import kotlinx.android.synthetic.main.dialog_app_info.view.*
import org.jetbrains.anko.startActivity
class SettingFragment : PreferenceFragment(), OnSharedPreferenceChangeListener, Preference.OnPreferenceChangeListener, Preference.OnPreferenceClickListener {
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt
index e68e3746..612c14e5 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/CustomListAdapter.kt
@@ -2,9 +2,7 @@ package net.lacolaco.smileessence.view.adapter
import android.widget.BaseAdapter
import net.lacolaco.smileessence.util.UIHandler
-
-import java.util.ArrayList
-import java.util.Collections
+import java.util.*
abstract class CustomListAdapter<out T> : BaseAdapter() {
private var isNotifiable = true
@@ -42,4 +40,4 @@ abstract class CustomListAdapter<out T> : BaseAdapter() {
fun updateForce() {
UIHandler().post { this.notifyDataSetChanged() }
}
-} \ No newline at end of file
+}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt
index 86e80e2b..b38bf25e 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/EventListAdapter.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.adapter
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt
index 90a17c90..6d80486f 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/MessageListAdapter.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.adapter
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt
index d400ac4f..2e739faa 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/PageListAdapter.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.adapter
import android.os.Bundle
@@ -29,10 +5,8 @@ import android.support.v13.app.FragmentPagerAdapter
import net.lacolaco.smileessence.activity.MainActivity
import net.lacolaco.smileessence.logging.Logger
import net.lacolaco.smileessence.view.page.PageFragment
-
import java.lang.ref.WeakReference
-import java.util.ArrayList
-import java.util.HashMap
+import java.util.*
class PageListAdapter(_activity: MainActivity) : FragmentPagerAdapter(_activity.fragmentManager) {
private val pages = ArrayList<PageInfo>()
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt
index 511db35e..362e183b 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/TimelineAdapter.kt
@@ -3,9 +3,9 @@ package net.lacolaco.smileessence.view.adapter
import android.app.Activity
import android.view.View
import android.view.ViewGroup
+import net.lacolaco.smileessence.World
import net.lacolaco.smileessence.entity.Tweet
import net.lacolaco.smileessence.view.Partials
-import net.lacolaco.smileessence.World
class TimelineAdapter(private val activity: Activity, private val world: World) : OrderedCustomListAdapter<Tweet>() {
val lastID: Long
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt b/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt
index f32fa7f3..46b40681 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/adapter/UnorderedCustomListAdapter.kt
@@ -3,7 +3,9 @@ package net.lacolaco.smileessence.view.adapter
import java.util.*
abstract class UnorderedCustomListAdapter<T> constructor(override val list: ArrayList<T> = ArrayList()) : CustomListAdapter<T>() {
- init { update() }
+ init {
+ update()
+ }
@Synchronized
fun add(item: T) = list.add(item)
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/ConfirmDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/ConfirmDialogFragment.kt
index 7491fc94..2a57a195 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/ConfirmDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/ConfirmDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/DisposeDialog.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/DisposeDialog.kt
index 3cd486bd..f827536c 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/DisposeDialog.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/DisposeDialog.kt
@@ -1,35 +1,8 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.Dialog
import android.content.Context
-/**
- * Dialog for dispose soon.
- */
class DisposeDialog(context: Context) : Dialog(context) {
override fun show() {
dismiss()
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/EditTextDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/EditTextDialogFragment.kt
index 9d277cd7..f35d6ba5 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/EditTextDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/EditTextDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.AlertDialog
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/MessageDetailDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/MessageDetailDialogFragment.kt
index 6359c1b5..715ee3dd 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/MessageDetailDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/MessageDetailDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2015 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.AlertDialog
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/SendMessageDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/SendMessageDialogFragment.kt
index 16bef540..c3008169 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/SendMessageDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/SendMessageDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.AlertDialog
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
index acbcbd81..3fcd40d1 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/StatusDetailDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.AlertDialog
@@ -48,9 +24,7 @@ import net.lacolaco.smileessence.view.Partials
import net.lacolaco.smileessence.view.adapter.TimelineAdapter
import net.lacolaco.smileessence.view.adapter.UnorderedCustomListAdapter
import org.jetbrains.anko.browse
-
-import java.util.ArrayList
-import java.util.LinkedHashSet
+import java.util.*
class StatusDetailDialogFragment : StackableDialogFragment() {
private lateinit var tweet: Tweet
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/TalkChainDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/TalkChainDialogFragment.kt
index 928708c2..cb838f49 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/TalkChainDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/TalkChainDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.AlertDialog
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt
index b2430b5a..11bf2919 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/dialog/UserDetailDialogFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.dialog
import android.app.AlertDialog
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/listener/ListItemClickListener.kt b/app/src/main/java/net/lacolaco/smileessence/view/listener/ListItemClickListener.kt
index 755bc07c..c79eab59 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/listener/ListItemClickListener.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/listener/ListItemClickListener.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.listener
import android.app.Activity
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/CustomListFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/CustomListFragment.kt
index 23174d09..880ee897 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/CustomListFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/CustomListFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.os.Bundle
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/HistoryFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/HistoryFragment.kt
index 6e5ba84e..ad062f61 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/HistoryFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/HistoryFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.os.Bundle
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/HomeFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/HomeFragment.kt
index 7803450a..579286e9 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/HomeFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/HomeFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.os.Bundle
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/MentionsFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/MentionsFragment.kt
index 1fabac59..426add6e 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/MentionsFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/MentionsFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.os.Bundle
@@ -40,7 +16,7 @@ class MentionsFragment : CustomListFragment<TimelineAdapter>() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
- world.addTimeline(this) { tweet ->
+ world.addTimeline(this) { tweet ->
if (tweet.mentions.contains(world.account.user.screenName)) {
adapter.add(tweet)
adapter.update()
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/MessagesFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/MessagesFragment.kt
index 89ac7853..0b4dab3b 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/MessagesFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/MessagesFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.os.Bundle
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/PostFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/PostFragment.kt
index 670dca30..da07c557 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/PostFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/PostFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.content.Intent
@@ -34,7 +10,7 @@ import android.text.TextUtils
import android.text.TextWatcher
import android.text.method.ArrowKeyMovementMethod
import android.view.*
-import android.widget.*
+import android.widget.TextView
import com.twitter.Validator
import kotlinx.android.synthetic.main.fragment_post.*
import net.lacolaco.smileessence.R
@@ -47,7 +23,6 @@ import net.lacolaco.smileessence.util.BitmapThumbnailTask
import net.lacolaco.smileessence.util.SystemServiceHelper
import net.lacolaco.smileessence.util.UIHandler
import net.lacolaco.smileessence.view.Partials
-
import java.io.File
class PostFragment : PageFragment(), TextWatcher, View.OnFocusChangeListener, View.OnClickListener, PostState.OnPostStateChangeListener {
@@ -74,7 +49,7 @@ class PostFragment : PageFragment(), TextWatcher, View.OnFocusChangeListener, Vi
}
}
- override fun refresh() { }
+ override fun refresh() {}
// --------------------- Interface OnFocusChangeListener ---------------------
@@ -254,4 +229,4 @@ class PostFragment : PageFragment(), TextWatcher, View.OnFocusChangeListener, Vi
.execute()
mainActivity.openHomePage()
}
-} \ No newline at end of file
+}
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/SearchFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/SearchFragment.kt
index 3b0d759d..2ffc7c6c 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/SearchFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/SearchFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.app.AlertDialog
@@ -48,8 +24,7 @@ import net.lacolaco.smileessence.util.UIHandler
import net.lacolaco.smileessence.view.adapter.TimelineAdapter
import net.lacolaco.smileessence.view.dialog.ConfirmDialogFragment
import twitter4j.Query
-
-import java.util.ArrayList
+import java.util.*
class SearchFragment : CustomListFragment<TimelineAdapter>(), View.OnClickListener, View.OnLongClickListener, View.OnFocusChangeListener {
override val adapter by lazy { TimelineAdapter(activity, world) }
@@ -110,6 +85,7 @@ class SearchFragment : CustomListFragment<TimelineAdapter>(), View.OnClickListen
SystemServiceHelper.hideIM(activity, edittext_search)
}
}
+
override val refreshMode: PullToRefreshBase.Mode
get() = PullToRefreshBase.Mode.BOTH
diff --git a/app/src/main/java/net/lacolaco/smileessence/view/page/UserListFragment.kt b/app/src/main/java/net/lacolaco/smileessence/view/page/UserListFragment.kt
index 91767135..7fa68c64 100644
--- a/app/src/main/java/net/lacolaco/smileessence/view/page/UserListFragment.kt
+++ b/app/src/main/java/net/lacolaco/smileessence/view/page/UserListFragment.kt
@@ -1,27 +1,3 @@
-/*
- * The MIT License (MIT)
- *
- * Copyright (c) 2012-2014 lacolaco.net
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in all
- * copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- */
-
package net.lacolaco.smileessence.view.page
import android.app.AlertDialog