* spelling: activity

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: animation

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: detailed

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: hierarchy

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: javascript

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: memory

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: notification

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: opened

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: preferable

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: repetitive

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: spoiler

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: thumbnail

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: visibility

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: whitespace

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
Josh Soref 2022-11-09 13:32:39 -05:00 committed by GitHub
commit 98092e6ff7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
63 changed files with 222 additions and 222 deletions

View file

@ -36,8 +36,8 @@ import java.net.URISyntaxException
import javax.inject.Inject
/** this is the base class for all activities that open links
* links are checked against the api if they are mastodon links so they can be openend in Tusky
* Subclasses must have a bottom sheet with Id item_status_bottom_sheet in their layout hierachy
* links are checked against the api if they are mastodon links so they can be opened in Tusky
* Subclasses must have a bottom sheet with Id item_status_bottom_sheet in their layout hierarchy
*/
abstract class BottomSheetActivity : BaseActivity() {

View file

@ -174,12 +174,12 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
}
return;
}
NotificationViewData.Concrete concreteNotificaton =
NotificationViewData.Concrete concreteNotification =
(NotificationViewData.Concrete) notification;
switch (viewHolder.getItemViewType()) {
case VIEW_TYPE_STATUS: {
StatusViewHolder holder = (StatusViewHolder) viewHolder;
StatusViewData.Concrete status = concreteNotificaton.getStatusViewData();
StatusViewData.Concrete status = concreteNotification.getStatusViewData();
if (status == null) {
/* in some very rare cases servers sends null status even though they should not,
* we have to handle it somehow */
@ -190,8 +190,8 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
}
holder.setupWithStatus(status, statusListener, statusDisplayOptions, payloadForHolder);
}
if (concreteNotificaton.getType() == Notification.Type.POLL) {
holder.setPollInfo(accountId.equals(concreteNotificaton.getAccount().getId()));
if (concreteNotification.getType() == Notification.Type.POLL) {
holder.setPollInfo(accountId.equals(concreteNotification.getAccount().getId()));
} else {
holder.hideStatusInfo();
}
@ -199,7 +199,7 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
}
case VIEW_TYPE_STATUS_NOTIFICATION: {
StatusNotificationViewHolder holder = (StatusNotificationViewHolder) viewHolder;
StatusViewData.Concrete statusViewData = concreteNotificaton.getStatusViewData();
StatusViewData.Concrete statusViewData = concreteNotification.getStatusViewData();
if (payloadForHolder == null) {
if (statusViewData == null) {
/* in some very rare cases servers sends null status even though they should not,
@ -213,19 +213,19 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
holder.setUsername(status.getAccount().getUsername());
holder.setCreatedAt(status.getCreatedAt());
if (concreteNotificaton.getType() == Notification.Type.STATUS ||
concreteNotificaton.getType() == Notification.Type.UPDATE) {
if (concreteNotification.getType() == Notification.Type.STATUS ||
concreteNotification.getType() == Notification.Type.UPDATE) {
holder.setAvatar(status.getAccount().getAvatar(), status.getAccount().getBot());
} else {
holder.setAvatars(status.getAccount().getAvatar(),
concreteNotificaton.getAccount().getAvatar());
concreteNotification.getAccount().getAvatar());
}
}
holder.setMessage(concreteNotificaton, statusListener);
holder.setMessage(concreteNotification, statusListener);
holder.setupButtons(notificationActionListener,
concreteNotificaton.getAccount().getId(),
concreteNotificaton.getId());
concreteNotification.getAccount().getId(),
concreteNotification.getId());
} else {
if (payloadForHolder instanceof List)
for (Object item : (List) payloadForHolder) {
@ -239,16 +239,16 @@ public class NotificationsAdapter extends RecyclerView.Adapter {
case VIEW_TYPE_FOLLOW: {
if (payloadForHolder == null) {
FollowViewHolder holder = (FollowViewHolder) viewHolder;
holder.setMessage(concreteNotificaton.getAccount(), concreteNotificaton.getType() == Notification.Type.SIGN_UP);
holder.setupButtons(notificationActionListener, concreteNotificaton.getAccount().getId());
holder.setMessage(concreteNotification.getAccount(), concreteNotification.getType() == Notification.Type.SIGN_UP);
holder.setupButtons(notificationActionListener, concreteNotification.getAccount().getId());
}
break;
}
case VIEW_TYPE_FOLLOW_REQUEST: {
if (payloadForHolder == null) {
FollowRequestViewHolder holder = (FollowRequestViewHolder) viewHolder;
holder.setupWithAccount(concreteNotificaton.getAccount(), statusDisplayOptions.animateAvatars(), statusDisplayOptions.animateEmojis());
holder.setupActionListener(accountActionListener, concreteNotificaton.getAccount().getId());
holder.setupWithAccount(concreteNotification.getAccount(), statusDisplayOptions.animateAvatars(), statusDisplayOptions.animateEmojis());
holder.setupActionListener(accountActionListener, concreteNotification.getAccount().getId());
}
break;
}

View file

@ -621,7 +621,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
});
if (reblogButton != null) {
reblogButton.setEventListener((button, buttonState) -> {
// return true to play animaion
// return true to play animation
int position = getBindingAdapterPosition();
if (position != RecyclerView.NO_POSITION) {
if (statusDisplayOptions.confirmReblogs()) {
@ -638,7 +638,7 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
}
favouriteButton.setEventListener((button, buttonState) -> {
// return true to play animaion
// return true to play animation
int position = getBindingAdapterPosition();
if (position != RecyclerView.NO_POSITION) {
if (statusDisplayOptions.confirmFavourites()) {
@ -873,16 +873,16 @@ public abstract class StatusBaseViewHolder extends RecyclerView.ViewHolder {
int resource;
switch (visibility) {
case PUBLIC:
resource = R.string.description_visiblity_public;
resource = R.string.description_visibility_public;
break;
case UNLISTED:
resource = R.string.description_visiblity_unlisted;
resource = R.string.description_visibility_unlisted;
break;
case PRIVATE:
resource = R.string.description_visiblity_private;
resource = R.string.description_visibility_private;
break;
case DIRECT:
resource = R.string.description_visiblity_direct;
resource = R.string.description_visibility_direct;
break;
default:
return "";

View file

@ -132,7 +132,7 @@ class LoginWebViewActivity : BaseActivity(), Injectable {
webView.settings.databaseEnabled = false
webView.settings.displayZoomControls = false
webView.settings.javaScriptCanOpenWindowsAutomatically = false
// Javascript needs to be enabled because otherwise 2FA does not work in some instances
// JavaScript needs to be enabled because otherwise 2FA does not work in some instances
@SuppressLint("SetJavaScriptEnabled")
webView.settings.javaScriptEnabled = true
webView.settings.userAgentString += " Tusky/${BuildConfig.VERSION_NAME}"

View file

@ -77,7 +77,7 @@ abstract class ActivitiesModule {
abstract fun contributesStatusListActivity(): StatusListActivity
@ContributesAndroidInjector(modules = [FragmentBuildersModule::class])
abstract fun contributesSearchAvtivity(): SearchActivity
abstract fun contributesSearchActivity(): SearchActivity
@ContributesAndroidInjector
abstract fun contributesAboutActivity(): AboutActivity

View file

@ -215,7 +215,7 @@ class ViewImageFragment : ViewMediaFragment() {
.dontAnimate()
.onlyRetrieveFromCache(true)
.centerInside()
.addListener(ImageRequestListener(true, isThumnailRequest = true))
.addListener(ImageRequestListener(true, isThumbnailRequest = true))
)
else it
}
@ -223,10 +223,10 @@ class ViewImageFragment : ViewMediaFragment() {
.error(
glide.load(url)
.centerInside()
.addListener(ImageRequestListener(false, isThumnailRequest = false))
.addListener(ImageRequestListener(false, isThumbnailRequest = false))
)
.centerInside()
.addListener(ImageRequestListener(true, isThumnailRequest = false))
.addListener(ImageRequestListener(true, isThumbnailRequest = false))
.into(photoView)
}
@ -252,7 +252,7 @@ class ViewImageFragment : ViewMediaFragment() {
*/
private inner class ImageRequestListener(
private val isCacheRequest: Boolean,
private val isThumnailRequest: Boolean
private val isThumbnailRequest: Boolean
) : RequestListener<Drawable> {
override fun onLoadFailed(
@ -262,7 +262,7 @@ class ViewImageFragment : ViewMediaFragment() {
isFirstResource: Boolean
): Boolean {
// If cache for full image failed complete transition
if (isCacheRequest && !isThumnailRequest && shouldStartTransition &&
if (isCacheRequest && !isThumbnailRequest && shouldStartTransition &&
!startedTransition
) {
photoActionsListener.onBringUp()
@ -296,7 +296,7 @@ class ViewImageFragment : ViewMediaFragment() {
}
} else {
// This wait for transition. If there's no transition then we should hit
// another branch. take() will unsubscribe after we have it to not leak menmory
// another branch. take() will unsubscribe after we have it to not leak memory
transition
.take(1)
.subscribe {

View file

@ -22,7 +22,7 @@ import com.keylesspalace.tusky.ViewMediaActivity
import com.keylesspalace.tusky.entity.Attachment
abstract class ViewMediaFragment : Fragment() {
private var toolbarVisibiltyDisposable: Function0<Boolean>? = null
private var toolbarVisibilityDisposable: Function0<Boolean>? = null
abstract fun setupMediaView(
url: String,
@ -83,14 +83,14 @@ abstract class ViewMediaFragment : Fragment() {
isDescriptionVisible = showingDescription
setupMediaView(url, previewUrl, description, showingDescription && mediaActivity.isToolbarVisible)
toolbarVisibiltyDisposable = (activity as ViewMediaActivity)
toolbarVisibilityDisposable = (activity as ViewMediaActivity)
.addToolbarVisibilityListener { isVisible ->
onToolbarVisibilityChange(isVisible)
}
}
override fun onDestroyView() {
toolbarVisibiltyDisposable?.invoke()
toolbarVisibilityDisposable?.invoke()
super.onDestroyView()
}
}

View file

@ -240,7 +240,7 @@ private fun openLinkInBrowser(uri: Uri?, context: Context) {
try {
context.startActivity(intent)
} catch (e: ActivityNotFoundException) {
Log.w(TAG, "Actvity was not found for intent, $intent")
Log.w(TAG, "Activity was not found for intent, $intent")
}
}

View file

@ -135,7 +135,7 @@ class ListStatusAccessibilityDelegate(
}
R.id.action_expand_cw -> {
// Toggling it directly to avoid animations
// which cannot be disabled for detaild status for some reason
// which cannot be disabled for detailed status for some reason
val holder = recyclerView.getChildViewHolder(host) as StatusBaseViewHolder
holder.toggleContentWarning()
// Stop and restart narrator before it reads old description.

View file

@ -90,7 +90,7 @@ object SmartLengthInputFilter : InputFilter {
keep = boundary
} else {
// If no runway is allowed simply remove whitespaces if present
// If no runway is allowed simply remove whitespace if present
while (source[keep - 1].isWhitespace()) {
--keep
if (keep == start) return ""

View file

@ -70,7 +70,7 @@ open class MediaPreviewImageView
* Overridden getScaleType method which returns CENTER_CROP if we have a focal point set.
*
* This is necessary because the Android transitions framework tries to copy the scale type
* from this view to the PhotoView when animating between this view and the detailled view of
* from this view to the PhotoView when animating between this view and the detailed view of
* the image. Since the PhotoView does not support a MATRIX scale type, the app would crash
* if we simply passed that on, so instead we pretend that CENTER_CROP is still used here
* even if we have a focus point set.

View file

@ -30,7 +30,7 @@ import java.util.Objects;
* It is either a {@link Placeholder} or a {@link Concrete}.
* It is modelled this way because close relationship between placeholder and concrete notification
* is fine in this case. Placeholder case is not modelled as a type of notification because
* invariants would be violated and because it would model domain incorrectly. It is prefereable to
* invariants would be violated and because it would model domain incorrectly. It is preferable to
* {@link com.keylesspalace.tusky.util.Either} because class hierarchy is cheaper, faster and
* more native.
*/